title: Calling SpeechAPI for text to speech on Azure
body: <p>I have the following very basic TTS code running on my local server</p>
  
  <pre><code>using System.Speech.Synthesis;
  ...
  SpeechSynthesizer reader = new SpeechSynthesizer();
  reader.Speak("This is a test");
  </code></pre>
  
  <p>This code has a dependency on System.Speech for which I have added a Reference in my VS 2015 project.
  Works fine but from what I have read and from trying it I know this will not work when the code is hosted on Azure.
  I have read several posts on SO querying if it is actually possible to do TTS on azure.  Certainly 2 yrs ago it did not appear to be possible. <a href="https://stackoverflow.com/questions/22230426/how-to-get-system-speech-on-windows-azure-websites">How to get System.Speech on windows azure websites?</a></p>
  
  <p>All roads seem to lead to the Microsoft Speech API
  <a href="https://azure.microsoft.com/en-gb/marketplace/partners/speechapis/speechapis/" rel="nofollow noreferrer">https://azure.microsoft.com/en-gb/marketplace/partners/speechapis/speechapis/</a>
  I have signed up and have gotten my private and sec keys for calling into this API.
  However my question is this.  How do I actually call the SpeechAPI?  What do I have to change in the simple code example above so that this will work when running on azure?</p>