dbieber / audiorecorder

AudioRecorder: a cross platform javascript utility for recording and playing audio in all major browsers
33 stars 14 forks source link

Audio is not recording and playing from online demo. #4

Closed suman closed 10 years ago

suman commented 10 years ago

It seems that you made good library, thank you for this.

During test your online example(http://dbieber.github.io/audiorecorder/examples/recorder.html), I am facing one problem.

After clicked on play button, I could not play recorded audio(I am not sure it's recording or not). The steps I have followed to record and play audio.

step 1 Clicked on AudioRecorder.init(config)

Step 2 Allow For microphone

Step 3 now clicked on AudioRecorder.record()

After saying some words

Step 4 now clicked on AudioRecorder.stopRecording(callback)

Step 5

now clicked on AudioRecorder.PlayClip(clip)

But the audio would not play after clicked on play button. The JavaScript error would come "Cannot read property samples of undefined" at near about line number 150 from audiorecorder.js

Am I doing something wrong?

Or

Your application is not working right now?

Please give reply to this query.

Thank you

dbieber commented 10 years ago

Hi, this is a problem. The problem is that it takes a substantial amount of time between when you click stopRecording before the recording is available for playback. Can you check to see that if you wait several seconds after clicking stopRecording that the number 0 pops up next to "Clips:" and that once it does pop up, you are able to play back your recording as in Step 5?

dbieber commented 10 years ago

It now converts to Speex in the background while recording so the wait is substantially shorter. Furthermore, though not shown in the demo, the clip is now ready to playback (in wave, not speex) immediately when you finish recording. So, while the demo will still error if you don't wait for the speex processing to finish, I am marking this issue closed.