Softcatala / whisper-ctranslate2

Whisper command line client compatible with original OpenAI client based on CTranslate2.
MIT License
911 stars 77 forks source link

Mic input for live transcription #86

Open joshoreefe opened 7 months ago

joshoreefe commented 7 months ago

After some upgrades and configuration changes the live transcription stopped working. My setup was working okay, but for unknown reason stopped capturing the mic input. Hence upgraded Jetson Orin Nano developer kit 4b to JetPack 5.1.3.

The live input device doesn't seem to capture audio same way as arecord. If I do a test recording so:

arecord -D usbmic test.wav Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

the recorded audio is fine. The audio file transcribes correctly.

If I then try live transcription using the same device so:

whisper-ctranslate2 --live_transcribe True --live_input_device 27 ....etc

the process starts okay: Live stream device: usbmic Listening.. (Ctrl+C to Quit)

But that's all. Nothing happens. Seems the capture is working differently from record?

joshoreefe commented 7 months ago

Is live transcribing working for others? If so, please give some setup hints!

Benjamin-Lee commented 6 months ago

Can confirm on Mac as well. Feeding in mp3 works but live stream doesn't, even though the device is detected.

965311532 commented 5 months ago

Live transcribing isn't working for me either

pheraph commented 2 months ago

The built-in microphone of the M-MacBooks is known to have problems with the input volume with various programs. Sometimes a sudo killall coreaudiod helps for a while, but not here. In fact, the threshold can be lowered, then it works for me:

whisper-ctranslate2 --live_transcribe True --live_volume_threshold 0.01