Spaces:
Running
Running
AIPeterWorld
commited on
Commit
•
265a1a0
1
Parent(s):
d75c957
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ GENERATION_CONFIG = {
|
|
36 |
"temperature": 0.1,
|
37 |
"top_p": 0.95,
|
38 |
"top_k": 64,
|
39 |
-
"max_output_tokens":
|
40 |
"response_mime_type": "application/json",
|
41 |
}
|
42 |
MODEL_NAME = "gemini-1.5-flash"
|
@@ -126,7 +126,8 @@ def generate_prompt(language):
|
|
126 |
)
|
127 |
|
128 |
async def generate_and_combine_audio_files(df_interview, output_dir, base_name):
|
129 |
-
voices = ["echo", "nova"]
|
|
|
130 |
combined = AudioSegment.empty()
|
131 |
|
132 |
with ThreadPoolExecutor() as executor:
|
@@ -152,7 +153,7 @@ def generate_audio(index, row, voices, output_dir):
|
|
152 |
voice = voices[index % len(voices)]
|
153 |
|
154 |
response = openai.audio.speech.create(
|
155 |
-
model="tts-1",
|
156 |
voice=voice,
|
157 |
response_format="mp3",
|
158 |
speed=1,
|
|
|
36 |
"temperature": 0.1,
|
37 |
"top_p": 0.95,
|
38 |
"top_k": 64,
|
39 |
+
"max_output_tokens": 10000,
|
40 |
"response_mime_type": "application/json",
|
41 |
}
|
42 |
MODEL_NAME = "gemini-1.5-flash"
|
|
|
126 |
)
|
127 |
|
128 |
async def generate_and_combine_audio_files(df_interview, output_dir, base_name):
|
129 |
+
#voices = ["echo", "nova"]
|
130 |
+
voices = ["fable", "nova"]
|
131 |
combined = AudioSegment.empty()
|
132 |
|
133 |
with ThreadPoolExecutor() as executor:
|
|
|
153 |
voice = voices[index % len(voices)]
|
154 |
|
155 |
response = openai.audio.speech.create(
|
156 |
+
model="tts-1.hd",
|
157 |
voice=voice,
|
158 |
response_format="mp3",
|
159 |
speed=1,
|