Update for CPU float32
Browse files- app.py +4 -0
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -8,6 +8,9 @@ import torch
|
|
| 8 |
import torchaudio
|
| 9 |
from seamless_communication.models.inference.translator import Translator
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
from transformers import pipeline
|
| 12 |
|
| 13 |
p = pipeline("automatic-speech-recognition")
|
|
@@ -16,6 +19,7 @@ from pydub import AudioSegment
|
|
| 16 |
import time
|
| 17 |
from time import sleep
|
| 18 |
|
|
|
|
| 19 |
|
| 20 |
def transcribe(audio, state=""):
|
| 21 |
# sleep(2)
|
|
|
|
| 8 |
import torchaudio
|
| 9 |
from seamless_communication.models.inference.translator import Translator
|
| 10 |
|
| 11 |
+
|
| 12 |
+
from m4t_app import *
|
| 13 |
+
|
| 14 |
from transformers import pipeline
|
| 15 |
|
| 16 |
p = pipeline("automatic-speech-recognition")
|
|
|
|
| 19 |
import time
|
| 20 |
from time import sleep
|
| 21 |
|
| 22 |
+
m4t_demo()
|
| 23 |
|
| 24 |
def transcribe(audio, state=""):
|
| 25 |
# sleep(2)
|
requirements.txt
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
fairseq2==0.1.0
|
|
|
|
| 2 |
git+https://github.com/facebookresearch/seamless_communication
|
| 3 |
gradio==3.41.0
|
| 4 |
huggingface_hub==0.16.4
|
|
|
|
| 1 |
+
# fairseq2==0.1.0
|
| 2 |
+
git+https://github.com/mduppes/fairseq2.git@93420c86ba01349ee8f90d7adda439b666b50557
|
| 3 |
git+https://github.com/facebookresearch/seamless_communication
|
| 4 |
gradio==3.41.0
|
| 5 |
huggingface_hub==0.16.4
|