I access a web service by HttpClient, and get a response that is supposed to contain a audio data (it is a TTS web service called Voice RSS).
I proceed this way :
response = await httpClient.GetAsync("http://api.voicerss.org?key=97a912d2574c4538afbf0919ad1f5402&hl=fr-fr&src=hello");
Then i take the content of the response :
content = response.Content;
stream = content.ReadAsStreamAsync();
result = stream.Result;
Then I really hesitate for the rest : I saw in many forums that I should use a MediaElement and set its source to the stream then call the "play" method, but it doesn't work for me. Others say that I should create a StreamReader to be able to read the stream ...
My goal is to play the sound contained in the response (which can be mp3 , wav etc..).
I don't know if I have to create a MediaElement , an IRandomAccessStream , a IIOStream , or anything else.
I am so confused because I've never found the same issue i'm having.
If you could please help me.
Thanks in advance.
--
Meima