Silverlight 4 - PCM data encoding from a microphone

I wrote a basic SL4 application for capturing audio data from a microphone using CaptureSource . The problem is that this is raw PCM output - which means huge and uncompressed.

Given that I need this application to run exclusively in an SL4 environment, how can I compress PCM audio data into something that can be delivered to a remote server more easily?

Essentially, I need a solution that I can also deploy / enable in a Windows Phone Series 7 application, and also that will work in a browser environment - so I think that managed code solutions?

In a conversation, people, for example, suggested Speex and WMA, but I did not find any libraries or examples that work without a link to DLLs that will not work in the SL4 project.

+7
c # silverlight audio pcm
source share
5 answers

Please view the WavFileHelper class in Silverlight 4 Rough Notes: support for camera and microphone on Mike Taut's blog (slightly lower than the middle of the page, but the full article is worth it), in which it compresses a PCM file in WAV.

In another example, when recording to WAV, you can change values ​​such as Mono / Stereo that will directly change the size of the WAV file: Audio Recording Example Silverlight 4 . And one more that gives more details on WAV recording: Creating sound using MediaStreamSource in Silverlight 3 Beta

+4
source share

Just a small addition to the Jason post :

There is another Speex port for .Net and Silverlight 4, called NSpeex .

+5
source share

Take a look at this . It looks like he put Speex encoder in C # for the exact problem you are trying to solve. Available here . Speex is designed for speech and should work better than wma, mp3 or other audio codecs that are designed to process music if you are just encoding the speech, which I assume, since you are capturing a microphone.

+1
source share

This article http://alvas.net/alvas.audio,articles.aspx#how-to-save-audio-to-mp3-on-silverlight on saving audio to the client. To send audio data to the server, you can use WebClient, for example.

0
source share

You can do encoding through the server by sending the entire stream to the WCF service and doing your encoding through the Microsoft Expression Encoding SDK API.

Please see this url that I asked before: http://forums.silverlight.net/forums/t/181141.aspx

Hi

-2
source share

All Articles