Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ from PLCMOS.plc_mos import PLCMOSEstimator
|
|
24 |
from speechmos import dnsmos
|
25 |
from speechmos import plcmos
|
26 |
|
27 |
-
import speech_recognition as
|
28 |
from jiwer import wer
|
29 |
|
30 |
|
@@ -294,21 +294,21 @@ if st.button('Сгенерировать потери'):
|
|
294 |
#df_merged = df_1.merge(df_2, left_index=True, right_index=True)
|
295 |
|
296 |
|
297 |
-
r =
|
298 |
|
299 |
-
harvard =
|
300 |
with harvard as source:
|
301 |
audio = r.record(source)
|
302 |
|
303 |
orig = r.recognize_google(audio, language = "ru-RU")
|
304 |
|
305 |
-
harvard =
|
306 |
with harvard as source:
|
307 |
audio = r.record(source)
|
308 |
lossy = r.recognize_google(audio, language = "ru-RU")
|
309 |
|
310 |
|
311 |
-
harvard =
|
312 |
with harvard as source:
|
313 |
audio = r.record(source)
|
314 |
enhanced = r.recognize_google(audio, language = "ru-RU")
|
|
|
24 |
from speechmos import dnsmos
|
25 |
from speechmos import plcmos
|
26 |
|
27 |
+
import speech_recognition as speech_r
|
28 |
from jiwer import wer
|
29 |
|
30 |
|
|
|
294 |
#df_merged = df_1.merge(df_2, left_index=True, right_index=True)
|
295 |
|
296 |
|
297 |
+
r = speech_r.Recognizer()
|
298 |
|
299 |
+
harvard = speech_r.AudioFile('target.wav')
|
300 |
with harvard as source:
|
301 |
audio = r.record(source)
|
302 |
|
303 |
orig = r.recognize_google(audio, language = "ru-RU")
|
304 |
|
305 |
+
harvard = speech_r.AudioFile('lossy.wav')
|
306 |
with harvard as source:
|
307 |
audio = r.record(source)
|
308 |
lossy = r.recognize_google(audio, language = "ru-RU")
|
309 |
|
310 |
|
311 |
+
harvard = speech_r.AudioFile('enhanced.wav')
|
312 |
with harvard as source:
|
313 |
audio = r.record(source)
|
314 |
enhanced = r.recognize_google(audio, language = "ru-RU")
|