Exemplo n.º 1
0
        /// <summary>
        /// Enqueues an utterance to be spoken with using specific parameters
        /// </summary>
        /// <param name="speechUtterance">A chunk of text to be spoken, along with parameters that affect its speech.</param>
        public static void Speak(SpeechUtterance speechUtterance)
        {
            var voiceIdentifier = speechUtterance.Voice == null ? string.Empty : speechUtterance.Voice.Identifier;

            TTS_iOS.Speak(speechUtterance.SpeechString, speechUtterance.PitchMultiplier,
                          speechUtterance.PreUtteranceDelay, speechUtterance.PostUtteranceDelay, speechUtterance.SpeechRate,
                          voiceIdentifier, speechUtterance.Volume);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Enqueues an utterance to be spoken with default voice using specific parameters
        /// </summary>
        /// <param name="speechString">The text to be spoken in the utterance.</param>
        /// <param name="speechUtteranceParameters">Parameters that affect the speech</param>
        public static void Speak(string speechString, SpeechUtteranceParameters speechUtteranceParameters)
        {
            var speechUtterance = new SpeechUtterance(speechString, speechUtteranceParameters);

            Speak(speechUtterance);
        }