0

I'm using the Azure code sample for Text to Speech API (https://github.com/Azure-Samples/Cognitive-Speech-TTS/tree/master/Samples-Http/PHP) which returns the audio but I don't understand how I capture the stream for playback in the browser?

I'm trying to build the Text to Speech demo here https://azure.microsoft.com/en-us/services/cognitive-services/speech/

Maria Ines Parnisari
  • 16,584
  • 9
  • 85
  • 130
thisisready
  • 623
  • 2
  • 10
  • 22

1 Answers1

0

Using file_put_contents takes the output from the API and streams the content to a file

file_put_contents($speechfilenamemp,$result);
thisisready
  • 623
  • 2
  • 10
  • 22
  • Strangely I tried with the Azure text to speech but could not get a sound file to output. – Benny Sep 07 '20 at 18:51