![](/img/trans.png)
[英]How can I get python to print out the current elapsed time while a function is running?
[英]In SpeechRecognition how can I get a print out of the current set energy threshold if set it by adjust_for_ambient_noise
在語音識別中,如果通過 adjust_for_ambient_noise 設置當前設置的能量閾值,我如何打印出來。 我想運行一些測試並使用自動記錄能量閾值
r.adjust_for_ambient_noise(source, duration=5)
非常感謝大家
print(r.energy_threshold)
使用來自
source
(AudioSource
實例)的音頻動態調整能量閾值以考慮環境噪聲。旨在根據環境能量水平校准能量閾值。 應該在沒有語音的音頻時段使用 - 如果檢測到任何語音,將提前停止。
duration
參數是在返回之前動態調整閾值的最大秒數。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.