3

I am trying to capture the microphone and send the recording to my server.. I tried this method here but it records only a big WAV and the upload can be slow sometimes.
Is there a way to capture the voice and compress it on the client side? Best method would be to send the recording while recording, but I have no Idea if this is possible. (It works for YouTube Live Webcam recording, it must work for Audio only too..)

MilMike
  • 12,571
  • 15
  • 65
  • 82
  • 2
    The officially supported way of doing this kind of thing with Flash is to have Adobe Flash Media Server, or the open source alternative Red5 (http://red5.org/) on the server side, and connect the Flash client to it using the NetConnection and NetStream objects in ActionScript. – Lars Blåsjö Dec 21 '11 at 17:46

2 Answers2

1

You can compress the file on the clientside using libmp3lame.js: https://github.com/akrennmair/libmp3lame-js

There is already a gitHub project that uses this library to record audio and save it in MP3 format directly in the browser:

https://github.com/nusofthq/Recordmp3js

Remus Negrota
  • 634
  • 6
  • 13
1

Hey check out this post where i replied to a guy with a similar question as you.

How do I embed a Flash audio recorder in my site

i dont know about client side compressing (i have looked into it before and couldnt find anything). But i know you can severely reduce the size of the file by limiting the rate of recording via these numbers here, where if i recall correctly 16 is 16khz recording

 recorder = new MicRecorder(wavencoder,null,50,16);

also sending to the server is not that hard, just look up how to post data, because the wav file is essentially binary data

Community
  • 1
  • 1
Stefan
  • 352
  • 3
  • 15
  • hope this helps, and also please let me know if you find out how to compress an audio file on the client side, and how effective it was. Thanks! – Stefan Dec 21 '11 at 19:25