Closed surajhes closed 5 years ago
currently it does not have an option to take audio from the microphone, however adding support for that should be quite simple, just grab the samples and feed them to the service like maybeSendChunk
does, you just need to know the recording format in case you need to change the content-type
value . If you decide to do it we would be very happy to incorporate it via pull request.
Hi. @daniel-bolanos ! Can you clearly explain the necessary changes that I will have to make in this code,in order to take input from microphone instead of prerecorded audio files? Please help! Waiting for your helpful response
@surajhes ,were you able to modify this code to take input from microphone??
Reading from microphone will require a Python abstraction library such as PyAudio. Or on Linux systems, you can use arecord's raw mode and pipe it to Watson STT through the websocket API.
Was anyone able to do this?? I'm trying my best here, but it's a bit tricky.
I'm still working on it. After necessary modifications, script has some logical errors but it's working.
@philippe-gregoire yes I'm using PyAudio
@aishaambar Can you share your code with us?
Hi i wanted to understand if this script can be used in a way where it listens to the speech from the microphone of the user and performs the transcribing of the spoken test?