Exemplo n.º 1
0
        public SpeechGenerator(SpeechAppData appData, SpeechForamt foramt = SpeechForamt.MP3, TTSParam ttsParam = default(TTSParam))
        {
            switch (foramt)
            {
            case SpeechForamt.WAV:
            case SpeechForamt.PCM:
            case SpeechForamt.AMR:
                throw new NotImplementedException("<Ming> ## Uni Exception ## Cls:SpeechGenerator Func:SpeechGenerator Info: only support mp3");

            case SpeechForamt.MP3:
                _handler = new MP3SpeechGenerator(appData, ttsParam);
                break;
            }
        }
Exemplo n.º 2
0
        public SpeechRecer(SpeechAppData appData, SpeechForamt format = SpeechForamt.WAV, RecType recType = RecType.ChineseAndSimpleEnglish)
        {
            switch (format)
            {
            case SpeechForamt.WAV:
                _handler = new CommonSpeechRec(appData, "wav", (int)recType);
                break;

            case SpeechForamt.PCM:
                _handler = new CommonSpeechRec(appData, "pcm", (int)recType);
                break;

            case SpeechForamt.AMR:
                _handler = new CommonSpeechRec(appData, "amr", (int)recType);
                break;

            case SpeechForamt.MP3:
                throw new NotImplementedException("<Ming> ## Uni Exception ## Cls:SpeechRecer Func:SpeechRecer Info: don't support mp3");
            }
        }