Commit
·
c475da6
1
Parent(s):
57c2abe
(wip)add gpu tags
Browse files
README.md
CHANGED
|
@@ -9,6 +9,8 @@ short_description: Vote on the latest Voice Clone TTS models!
|
|
| 9 |
pinned: true
|
| 10 |
|
| 11 |
hf_oauth: true
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
[//]: # (Please see the [GitHub repo](https://github.com/TTS-AGI/TTS-Arena-V2) for information.)
|
|
|
|
| 9 |
pinned: true
|
| 10 |
|
| 11 |
hf_oauth: true
|
| 12 |
+
preload_from_hub:
|
| 13 |
+
- FunAudioLLM/CosyVoice2-0.5B
|
| 14 |
---
|
| 15 |
|
| 16 |
[//]: # (Please see the [GitHub repo](https://github.com/TTS-AGI/TTS-Arena-V2) for information.)
|
app.py
CHANGED
|
@@ -539,6 +539,7 @@ def initialize_tts_cache():
|
|
| 539 |
|
| 540 |
@app.route("/api/tts/generate", methods=["POST"])
|
| 541 |
@limiter.limit("10 per minute") # Keep limit, cached responses are still requests
|
|
|
|
| 542 |
def generate_tts():
|
| 543 |
# If verification not setup, handle it first
|
| 544 |
if app.config["TURNSTILE_ENABLED"] and not session.get("turnstile_verified"):
|
|
@@ -629,7 +630,7 @@ def generate_tts():
|
|
| 629 |
model_ids = []
|
| 630 |
|
| 631 |
# Function to process a single model (generate directly to TEMP_AUDIO_DIR, not cache subdir)
|
| 632 |
-
|
| 633 |
def process_model_on_the_fly(model):
|
| 634 |
# 传递 reference_audio_path 给 predict_tts
|
| 635 |
temp_audio_path = predict_tts(text, model.id, reference_audio_path=reference_audio_path)
|
|
|
|
| 539 |
|
| 540 |
@app.route("/api/tts/generate", methods=["POST"])
|
| 541 |
@limiter.limit("10 per minute") # Keep limit, cached responses are still requests
|
| 542 |
+
@spaces.GPU
|
| 543 |
def generate_tts():
|
| 544 |
# If verification not setup, handle it first
|
| 545 |
if app.config["TURNSTILE_ENABLED"] and not session.get("turnstile_verified"):
|
|
|
|
| 630 |
model_ids = []
|
| 631 |
|
| 632 |
# Function to process a single model (generate directly to TEMP_AUDIO_DIR, not cache subdir)
|
| 633 |
+
|
| 634 |
def process_model_on_the_fly(model):
|
| 635 |
# 传递 reference_audio_path 给 predict_tts
|
| 636 |
temp_audio_path = predict_tts(text, model.id, reference_audio_path=reference_audio_path)
|