Recording Audio in the Browser Using the MediaStream
See original GitHub issueHi,
I’m trying to capture and to record a voice in the browser. Looks like modern browsers (at least Firefox and Chrome) don’t support recording audio/wav
.
Is it possible to configure vosk-server to be able to handle MIME types: audio/ogg
or audio/webm
too?
Thanks, Vlad
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Using the MediaStream Recording API - MDN Web Docs
The MediaStream Recording API makes it easy to record audio and/or video streams. When used with navigator.mediaDevices.
Read more >Recording Audio With the MediaStream Recorder API
The MediaStream Recorder API makes media recording in the browser very easy. It allows capturing chunks of (audio) data from a microphone media...
Read more >How to Record Audio Using the MediaStream API - SitePoint
How to Record Audio Using the MediaStream API ... Then go to localhost:3000 in your browser. You'll see a record button. Record Page....
Read more >Record audio and video with MediaRecorder
The MediaRecorder API enables you to record audio and video from a web app. It's available now in Firefox and in Chrome for...
Read more >An introduction to the MediaRecorder API - Twilio
To start with the MediaRecorder API, you need a MediaStream. You can either get one from a <video> or <audio> element or by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The audio you recorded with addpipe is 44100 hz sample rate, server by default expects 8000 hz sample rate. To reconfigure the server you can send config message like this:
as in test_words.py example.
In general it is pretty wasteful to send 44khz audio over network, you’d better resample to 8000hz on client, you can use resampler javascript library for that as in angular js demo:
https://github.com/alphacep/vosk-server/blob/1461abc592855dceb436ca8538d7766b0a877216/client-samples/angular-demo/src/assets/recorder-worker.js#L3
Hi,
I don’t think so that the problem is with sending, in my opinion the problem is in Chrome/Firefox they use the audio format that the vosk-server can not parse/read. I am attaching vosk-server-test.zip with the scripts and the readme file where I have described the scenarios that I did. Could you have a look at them maybe it will help you to understand what I mean. You can see that the wav files were recorded in the browsers don’t work, it doesn’t matter how I will send them to the vosk-server either via javascript in the browser or via the command line using python script.
Thanks, Vlad