Reputation: 97
i have been trying to play some sound(.wav) from a website link on windows phone 7 using the media element.
MediaElement mediaElement = new MediaElement(); mediaElement.source = new uri("http://api.microsofttranslator.com%2fwav"); mediaElement.play();
doesnt do anything.
i tried implementing handlers or even try to use the Webclient class to download the stream and play it but it has the same problem i dont hear anything.
and also i copied the uri to the browser and it played the wave i needed.
Upvotes: 0
Views: 1005
Reputation: 69372
If you want to use Microsoft Translator
, you can add a Service Reference
to the API SOAP service. The Service Client exposes the SpeakAsync method which will return the URL of the WAV
file. You can then use your WebClient
or HttpWebRequest
to download the stream and play it. There's example code in this blog post.
Upvotes: 1