PeterNerlich / live_transcript

0 stars 0 forks source link

Detect and alert to microphone distortion #17

Open PeterNerlich opened 6 months ago

PeterNerlich commented 6 months ago

Clipping and distortion in the supplied data can significantly impact speech recognition quality. Users don't hear the audio they channel into the browser and cannot easily detect incorrect levels or distorted audio.

Grab the raw microphone input and look for indicators for distorted audio. Be mindful that the signal might be clipping, even if the audio stream itself doesn't reach its limits because of driver levels or upstream equipment. Alert the user to this.

Additionally, it might be helpful to visualise the audio as a waveform, incorporating the speechstart/speechend events from the SpeechToText API in addition to clipping and distortion indicators.