Additionally, adjusted the volume measurement to a fixed interval of 0.05 seconds, ensuring all data is consistently analyzed for better precision.
Threshold adjustment
Introduce a new parameter noise_margin to allow dynamic adjustment of the sensitivity margin above the measured noise level.
This parameter helps in fine-tuning the voice detection threshold based on ambient noise conditions, enhancing the flexibility and effectiveness of the audio settings.
To manually set the noise filter level for voice detection, set auto_noise_filter_threshold to False and specify the volume_threshold_db in decibels (dB).
app = AIAvatar(
openai_api_key=OPENAI_API_KEY,
google_api_key=GOOGLE_API_KEY,
auto_noise_filter_threshold=False,
volume_threshold_db=-40 # Set the voice detection threshold to -40 dB
)
Overview
Improved the accuracy of the speech recognition system by implementing automatic threshold settings based on measured ambient noise levels.
Additionally, adjusted the volume measurement to a fixed interval of 0.05 seconds, ensuring all data is consistently analyzed for better precision.
Threshold adjustment
Introduce a new parameter
noise_margin
to allow dynamic adjustment of the sensitivity margin above the measured noise level. This parameter helps in fine-tuning the voice detection threshold based on ambient noise conditions, enhancing the flexibility and effectiveness of the audio settings.Set noise filter level manually
To manually set the noise filter level for voice detection, set
auto_noise_filter_threshold
toFalse
and specify thevolume_threshold_db
in decibels (dB).