0

I am working on a universal windows translator application for state level translation. I want to make my device speak translated text. The translated language is state level language something like making my device speak Hindi translated text. Is there any way of achieving this? I am currently trying phonemes in SSML but my xml too gives me an error stating "Text couldn't be found with this error" my string code his as follows:

 string Ssml =
            @"<speak version='1.0' " +
            "xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'>" +
            "<voice name='Microsoft Zira Mobile'>" +
            "<phoneme alphabet='x - microsoft - ups' ph='S1 W AA T . CH AX . M AX . S2 K AA L . IH T'>whatchamacallit</phoneme>" + 
            "<prosody pitch='default' rate='1'>" + mytext + "</prosody>" +
            "</voice></speak>";



        // Generate the audio stream from plain text.
        SpeechSynthesisStream stream = await speech.SynthesizeSsmlToStreamAsync(Ssml);

where am I going wrong?

iam.Carrot
  • 4,235
  • 2
  • 17
  • 59
  • what is the "this error"? while a bit weird, the prosody tag does nothing and you are never defining what you want to say, unless the the phoneme are defined in the mytext – dabhand Aug 29 '16 at 15:06
  • The error is a runtime exception and it states text couldn't be found with this error. Secondly the myText has the value whatchamacallit – iam.Carrot Aug 29 '16 at 15:10
  • try using the demo ssml on the MSDN site if that works then remove everything between the speak tags and use just the phoneme tag. The prosody tag isn't doing anything anyway. And you are not adding to the lexicon with that first call. It will just say whatchamacallit and then whatever SAPI thinks whatchamacallit is – dabhand Aug 29 '16 at 15:22
  • Thanks you for the guidance, do you have a piece of code I could try or maybe a link? – iam.Carrot Aug 29 '16 at 15:23
  • https://msdn.microsoft.com/en-us/library/windows.media.speechsynthesis.speechsynthesisstream.aspx – dabhand Aug 30 '16 at 14:48

0 Answers0