Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,14 +9,14 @@ files = ['reverb_asr_v1.jit.zip', 'tk.units.txt']
|
|
| 9 |
downloaded_files = [hf_hub_download(repo_id=REPO_ID, filename=f) for f in files]
|
| 10 |
model = load_model(downloaded_files[0], downloaded_files[1])
|
| 11 |
|
| 12 |
-
def
|
| 13 |
device = torch.device("cpu")
|
| 14 |
embedding = torch.tensor([style, 1 - style], device=device)
|
| 15 |
return embedding
|
| 16 |
|
| 17 |
|
| 18 |
@spaces.GPU
|
| 19 |
-
def
|
| 20 |
if not audio:
|
| 21 |
return "Input Error! Please enter one audio!"
|
| 22 |
|
|
|
|
| 9 |
downloaded_files = [hf_hub_download(repo_id=REPO_ID, filename=f) for f in files]
|
| 10 |
model = load_model(downloaded_files[0], downloaded_files[1])
|
| 11 |
|
| 12 |
+
def process_cat_embs(style):
|
| 13 |
device = torch.device("cpu")
|
| 14 |
embedding = torch.tensor([style, 1 - style], device=device)
|
| 15 |
return embedding
|
| 16 |
|
| 17 |
|
| 18 |
@spaces.GPU
|
| 19 |
+
def transcribe_audio(audio, style=0):
|
| 20 |
if not audio:
|
| 21 |
return "Input Error! Please enter one audio!"
|
| 22 |
|