Commit
·
4281c8c
1
Parent(s):
d0834d6
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,12 +78,9 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic,no_lang_aut
|
|
| 78 |
try:
|
| 79 |
# Filtering for microphone input, as it has BG noise, maybe silence in beginning and end
|
| 80 |
# This is fast filtering not perfect
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
#fast_denoise="afftdn=nr=12:nf=-25"
|
| 84 |
-
|
| 85 |
# better to remove silence in beginning and end for microphone
|
| 86 |
-
trim_silence="areverse,
|
| 87 |
|
| 88 |
speechnorm="e=6.25:r=0.00001:l=1,"
|
| 89 |
|
|
|
|
| 78 |
try:
|
| 79 |
# Filtering for microphone input, as it has BG noise, maybe silence in beginning and end
|
| 80 |
# This is fast filtering not perfect
|
| 81 |
+
|
|
|
|
|
|
|
|
|
|
| 82 |
# better to remove silence in beginning and end for microphone
|
| 83 |
+
trim_silence="areverse,silenceremove=start_periods=1:start_silence=0:start_threshold=0.02,areverse,silenceremove=start_periods=1:start_silence=0:start_threshold=0.02"
|
| 84 |
|
| 85 |
speechnorm="e=6.25:r=0.00001:l=1,"
|
| 86 |
|