Update app.py
Browse files
app.py
CHANGED
|
@@ -133,7 +133,7 @@ def generate_audio_chunk_with_retry(chunk_text, prompt_text, voice, temp, sessio
|
|
| 133 |
|
| 134 |
logging.info(f"[{session_id}] ⚙️ تلاش برای تولید قطعه با کلید API شماره {key_idx_display}")
|
| 135 |
try:
|
| 136 |
-
final_text = f'
|
| 137 |
contents = [types.Content(role="user", parts=[types.Part.from_text(text=final_text)])]
|
| 138 |
config = types.GenerateContentConfig(temperature=temp, response_modalities=["audio"],
|
| 139 |
speech_config=types.SpeechConfig(voice_config=types.VoiceConfig(
|
|
|
|
| 133 |
|
| 134 |
logging.info(f"[{session_id}] ⚙️ تلاش برای تولید قطعه با کلید API شماره {key_idx_display}")
|
| 135 |
try:
|
| 136 |
+
final_text = f'{chunk_text}({prompt_text})' if prompt_text and prompt_text.strip() else chunk_text
|
| 137 |
contents = [types.Content(role="user", parts=[types.Part.from_text(text=final_text)])]
|
| 138 |
config = types.GenerateContentConfig(temperature=temp, response_modalities=["audio"],
|
| 139 |
speech_config=types.SpeechConfig(voice_config=types.VoiceConfig(
|