candle
candle copied to clipboard
Whisper microphone example: do not repeatedly acquire and release the microphone
Changes
- The input stream from the microphone is built once in the thread that handles it.
- Inside the loop block, the stream is played and paused for the defined duration (300ms) to capture the pcm data.
- The
iter::repeat(()).enumerate()to keep track of the inference iteration is replaced with a simple0..range.
@lavafroth did you have any luck actually getting useful outputs after your change? I can see the reaquiring issue (almost) solved, some flickering on microphone access visible in xfce taskbar but in pulseaudio (pavucontrol) I can see that the recording device is not re acquired repeatingly .
I'm asking since the mic example does not work for others (see referenced issue) from @krzytofwos
I have a pretty low end machine but yes it works better than the previous iteration. 😇
-------- Original Message -------- On 23/07/24 16:13, chris-aeviator wrote:
@.***(https://github.com/lavafroth) did you have any luck actually getting useful outputs after your change? I can see the reaquiring issue (almost) solved, some flickering on microphone access visible in xfce taskbar but in pulseaudio (pavucontrol) I can see that the recording device is not re acquired repeatingly .
I'm asking since the mic example does not work for others (see referenced issue) from @krzytofwos
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>