2

I am wondering if anyone has success with audio record (from microphone on the users browser) and playback from a web based app (Ruby/RoR)?

What I have found so far - I could write a flex/flash app which will record the audio and then have a server side like Red5 or so to receive and convert. This sounds more involved and I also saw different types of hosting issues etc people are having - so I am thinking there may be better/easier solutions out there!! I looked at html5/web-kit too but seems to only works on chrome and is limited to text fields etc.

In my app, i want to record users voice, save it on a aws/s3 as mp3 or similar file format and play it back to user within the app based on users input/choice. While flash based solution is workable for now, non-flash based solution will be preferred as it will support more devices (you know devices I am referring)..

2 Answers2

1

The only options for web based record are Flash, Silverlight or Java. None of these will work on an iPhone or iPad - You will need a native app for that.

You don't need to use Red5 for Flash recording - you can record direct to memory, optionally encode (or zip), and then upload the the data. You might be better doing mp3 encoding server-side using ffmpeg or SoX before moving the file to s3.

hooleyhoop
  • 9,128
  • 5
  • 37
  • 58
  • The downside of recording direct to memory in Flash is that the APIs for that don't support compression, so you're going to be sending uncompressed wavs back to your server. – warhammerkid Nov 23 '11 at 18:35
  • @warhammerkid there are options - zip is easy enough and there are as3 / alchemy implemenations of flac, mp3, etc – hooleyhoop Nov 23 '11 at 22:31
  • Thank you both for your answers and comments - helpful. Have you seen any opensource even experimental code in flex - might save me time instead of writing from scratch? I searched, found one that sells license to his flash binaries - I am not confortable depending on binary from little known sources, so looking for better options. I also saw preliminarily a Tropo (a phone app that might be able to kludged up to a webapp) has some audio apis that uses their service for recording. – Superman7091 Nov 25 '11 at 13:32
0

There is a way using HTML5 and a server. Just record a video.
Convert the video to audio, then use the audio as you wish.

This implementation takes audio from a video and runs ffmpeg to extract the audio:

http://goo.gl/A0bya

This is in PHP, but it should not be too hard to create a Ruby version. Easy peasy.

John Moore
  • 178
  • 2
  • 6