Hamed744 commited on
Commit
f7677f8
·
verified ·
1 Parent(s): e057a12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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'"{prompt_text}"\n{chunk_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(
 
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(