Spaces:
Build error
Build error
Update audio_pipe.py
Browse files- audio_pipe.py +6 -1
audio_pipe.py
CHANGED
|
@@ -6,7 +6,6 @@ from typing import List, Tuple
|
|
| 6 |
import numpy as np
|
| 7 |
import torch
|
| 8 |
# from app.pipelines import Pipeline
|
| 9 |
-
from app.pipelines.utils import ARG_OVERRIDES_MAP
|
| 10 |
from fairseq import hub_utils
|
| 11 |
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
|
| 12 |
from fairseq.models.speech_to_speech.hub_interface import S2SHubInterface
|
|
@@ -18,6 +17,12 @@ from fairseq.models.text_to_speech.hub_interface import (
|
|
| 18 |
)
|
| 19 |
from huggingface_hub import snapshot_download
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
class SpeechToSpeechPipeline():
|
| 23 |
def __init__(self, model_id: str):
|
|
|
|
| 6 |
import numpy as np
|
| 7 |
import torch
|
| 8 |
# from app.pipelines import Pipeline
|
|
|
|
| 9 |
from fairseq import hub_utils
|
| 10 |
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
|
| 11 |
from fairseq.models.speech_to_speech.hub_interface import S2SHubInterface
|
|
|
|
| 17 |
)
|
| 18 |
from huggingface_hub import snapshot_download
|
| 19 |
|
| 20 |
+
ARG_OVERRIDES_MAP = {
|
| 21 |
+
"facebook/xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022": {
|
| 22 |
+
"config_yaml": "config.yaml",
|
| 23 |
+
"task": "speech_to_text",
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
|
| 27 |
class SpeechToSpeechPipeline():
|
| 28 |
def __init__(self, model_id: str):
|