Spaces:
Running
Running
Liangcd
commited on
Commit
·
76ddd3a
1
Parent(s):
45ed0df
[demo] support English
Browse files
app.py
CHANGED
@@ -30,6 +30,7 @@ def recognition(audio, lang='CN'):
|
|
30 |
y, _ = librosa.load(audio, sr=16000)
|
31 |
# NOTE: model supports 16k sample_rate
|
32 |
y = (y * (1 << 15)).astype("int16")
|
|
|
33 |
if lang == 'CN':
|
34 |
if cur_lang != lang:
|
35 |
del decoder
|
|
|
30 |
y, _ = librosa.load(audio, sr=16000)
|
31 |
# NOTE: model supports 16k sample_rate
|
32 |
y = (y * (1 << 15)).astype("int16")
|
33 |
+
global cur_lang
|
34 |
if lang == 'CN':
|
35 |
if cur_lang != lang:
|
36 |
del decoder
|