Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,11 +72,11 @@ def load_speaker_embeddings(model_name):
|
|
| 72 |
|
| 73 |
# Use a different model for text-to-audio if stabilityai/stable-audio-open-1.0 is not supported
|
| 74 |
try:
|
| 75 |
-
text_to_audio_pipeline = pipeline("text-to-audio", model="stabilityai/stable-audio-open-1.0",
|
| 76 |
except ValueError as e:
|
| 77 |
logger.error(f"Error loading stabilityai/stable-audio-open-1.0: {e}")
|
| 78 |
logger.info("Falling back to a different text-to-audio model.")
|
| 79 |
-
text_to_audio_pipeline = pipeline("text-to-audio", model="microsoft/speecht5_tts",
|
| 80 |
speaker_embeddings = load_speaker_embeddings("microsoft/speecht5_tts")
|
| 81 |
|
| 82 |
audio_classification_pipeline = pipeline("audio-classification", model="facebook/wav2vec2-base", device=device)
|
|
|
|
| 72 |
|
| 73 |
# Use a different model for text-to-audio if stabilityai/stable-audio-open-1.0 is not supported
|
| 74 |
try:
|
| 75 |
+
text_to_audio_pipeline = pipeline("text-to-audio", model="stabilityai/stable-audio-open-1.0", device=device)
|
| 76 |
except ValueError as e:
|
| 77 |
logger.error(f"Error loading stabilityai/stable-audio-open-1.0: {e}")
|
| 78 |
logger.info("Falling back to a different text-to-audio model.")
|
| 79 |
+
text_to_audio_pipeline = pipeline("text-to-audio", model="microsoft/speecht5_tts", device=device)
|
| 80 |
speaker_embeddings = load_speaker_embeddings("microsoft/speecht5_tts")
|
| 81 |
|
| 82 |
audio_classification_pipeline = pipeline("audio-classification", model="facebook/wav2vec2-base", device=device)
|