コード例 #1
0
        public static Stream Authenticate()
        {
            TextToSpeechService _textToSpeech = new TextToSpeechService();
            string username = "******";
            string password = "******";

            //string url = "https://stream.watsonplatform.net/text-to-speech/api";



            _textToSpeech.SetCredential(username, password);
            var voices = _textToSpeech.GetVoices();
            var strem  = _textToSpeech.Synthesize("Hello Sabio Nation! Go win some money!", Voice.EN_ALLISON, AudioType.WAV);

            return(strem);
        }
コード例 #2
0
        public TextToSpeechServiceExample(string username, string password)
        {
            _textToSpeech.SetCredential(username, password);

            GetVoices();
            GetVoice();
            GetPronunciation();
            Synthesize();
            GetCustomVoiceModels();
            SaveCustomVoiceModel();
            UpdateCustomVoiceModel();
            GetCustomVoiceModel();
            SaveWords();
            GetWords();
            DeleteWord();
            DeleteCustomVoiceModel();
        }