Update app.py
Browse files
app.py
CHANGED
|
@@ -129,7 +129,7 @@ def decode_tokens(token_file):
|
|
| 129 |
print(f"Decoding error: {str(e)}")
|
| 130 |
return None, f"Error decoding tokens: {str(e)}"
|
| 131 |
|
| 132 |
-
@spaces.GPU(duration=
|
| 133 |
def process_both(audio_path):
|
| 134 |
"""Encode and then decode the audio without saving intermediate files"""
|
| 135 |
try:
|
|
@@ -179,7 +179,7 @@ def process_both(audio_path):
|
|
| 179 |
print(f"Processing error: {str(e)}")
|
| 180 |
return None, f"Error processing audio: {str(e)}"
|
| 181 |
|
| 182 |
-
@spaces.GPU(duration=
|
| 183 |
def stream_both(audio_path):
|
| 184 |
"""Encode and then stream decode the audio"""
|
| 185 |
try:
|
|
@@ -261,7 +261,7 @@ def stream_both(audio_path):
|
|
| 261 |
print(f"Streaming process error: {str(e)}")
|
| 262 |
yield None, f"Error processing audio: {str(e)}"
|
| 263 |
|
| 264 |
-
@spaces.GPU(duration=
|
| 265 |
def stream_decode_tokens(token_file):
|
| 266 |
"""Decode tokens to audio in streaming chunks"""
|
| 267 |
# Ensure the file exists and has content
|
|
|
|
| 129 |
print(f"Decoding error: {str(e)}")
|
| 130 |
return None, f"Error decoding tokens: {str(e)}"
|
| 131 |
|
| 132 |
+
@spaces.GPU(duration=250)
|
| 133 |
def process_both(audio_path):
|
| 134 |
"""Encode and then decode the audio without saving intermediate files"""
|
| 135 |
try:
|
|
|
|
| 179 |
print(f"Processing error: {str(e)}")
|
| 180 |
return None, f"Error processing audio: {str(e)}"
|
| 181 |
|
| 182 |
+
@spaces.GPU(duration=250)
|
| 183 |
def stream_both(audio_path):
|
| 184 |
"""Encode and then stream decode the audio"""
|
| 185 |
try:
|
|
|
|
| 261 |
print(f"Streaming process error: {str(e)}")
|
| 262 |
yield None, f"Error processing audio: {str(e)}"
|
| 263 |
|
| 264 |
+
@spaces.GPU(duration=250)
|
| 265 |
def stream_decode_tokens(token_file):
|
| 266 |
"""Decode tokens to audio in streaming chunks"""
|
| 267 |
# Ensure the file exists and has content
|