Spaces:
Sleeping
Sleeping
游雁
commited on
Commit
•
27c943a
1
Parent(s):
34272a8
update
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ import numpy as np
|
|
11 |
import torch
|
12 |
import torchaudio
|
13 |
|
|
|
14 |
|
15 |
from funasr import AutoModel
|
16 |
|
@@ -139,6 +140,7 @@ def format_str_v3(s):
|
|
139 |
new_s = new_s.replace("The.", " ")
|
140 |
return new_s.strip()
|
141 |
|
|
|
142 |
def model_inference(input_wav, language, fs=16000):
|
143 |
# task_abbr = {"Speech Recognition": "ASR", "Rich Text Transcription": ("ASR", "AED", "SER")}
|
144 |
language_abbr = {"auto": "auto", "zh": "zh", "en": "en", "yue": "yue", "ja": "ja", "ko": "ko",
|
|
|
11 |
import torch
|
12 |
import torchaudio
|
13 |
|
14 |
+
import spaces
|
15 |
|
16 |
from funasr import AutoModel
|
17 |
|
|
|
140 |
new_s = new_s.replace("The.", " ")
|
141 |
return new_s.strip()
|
142 |
|
143 |
+
@spaces.GPU
|
144 |
def model_inference(input_wav, language, fs=16000):
|
145 |
# task_abbr = {"Speech Recognition": "ASR", "Rich Text Transcription": ("ASR", "AED", "SER")}
|
146 |
language_abbr = {"auto": "auto", "zh": "zh", "en": "en", "yue": "yue", "ja": "ja", "ko": "ko",
|