Spaces:
Runtime error
Runtime error
Liangcd
commited on
Commit
•
cbdf41c
1
Parent(s):
e82254c
[demo] support English
Browse files
app.py
CHANGED
@@ -31,6 +31,7 @@ def recognition(audio, lang='CN'):
|
|
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
|
|
|
31 |
# NOTE: model supports 16k sample_rate
|
32 |
y = (y * (1 << 15)).astype("int16")
|
33 |
global cur_lang
|
34 |
+
global decoder
|
35 |
if lang == 'CN':
|
36 |
if cur_lang != lang:
|
37 |
del decoder
|