Update app.py
Browse filesconfigure file environment
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import os
|
2 |
|
3 |
-
os.system(
|
4 |
-
os.system(
|
5 |
-
os.system(
|
6 |
-
os.system(
|
7 |
|
8 |
import gradio as gr
|
9 |
import numpy as np
|
@@ -29,7 +29,7 @@ speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze
|
|
29 |
|
30 |
|
31 |
def translate(audio, transliteration = lambda txt: txt):
|
32 |
-
outputs =
|
33 |
return transliteration(outputs["text"])
|
34 |
|
35 |
import subprocess
|
|
|
1 |
import os
|
2 |
|
3 |
+
os.system("wget https://www.isi.edu/~ulf/uroman/downloads/uroman-v1.2.7.tar.gz")
|
4 |
+
os.system("mkdir uroman")
|
5 |
+
os.system("tar -zxvf ./uroman-v1.2.7.tar.gz -C ./uroman")
|
6 |
+
os.system("chmod +x ./uroman/bin/uroman.pl")
|
7 |
|
8 |
import gradio as gr
|
9 |
import numpy as np
|
|
|
29 |
|
30 |
|
31 |
def translate(audio, transliteration = lambda txt: txt):
|
32 |
+
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "be"})#larusian
|
33 |
return transliteration(outputs["text"])
|
34 |
|
35 |
import subprocess
|