Update app.py
Browse files
app.py
CHANGED
|
@@ -43,7 +43,7 @@ def generate_podcast(file, url, tone, length):
|
|
| 43 |
try:
|
| 44 |
for item in script.dialogue:
|
| 45 |
audio_file = generate_audio(item.text, item.speaker)
|
| 46 |
-
audio_segment = AudioSegment.
|
| 47 |
audio_segments.append(audio_segment)
|
| 48 |
transcript += f"**{item.speaker}**: {item.text}\n\n"
|
| 49 |
os.remove(audio_file) # Clean up temporary audio file
|
|
@@ -76,7 +76,7 @@ Welcome to the Podcast Generator project! This tool allows you to create custom
|
|
| 76 |
4. Click "Generate" to create your podcast
|
| 77 |
5. Listen to the generated audio and review the transcript
|
| 78 |
|
| 79 |
-
Note: This tool uses the LLaMa 3.1 70B model for script generation and
|
| 80 |
"""
|
| 81 |
|
| 82 |
iface = gr.Interface(
|
|
|
|
| 43 |
try:
|
| 44 |
for item in script.dialogue:
|
| 45 |
audio_file = generate_audio(item.text, item.speaker)
|
| 46 |
+
audio_segment = AudioSegment.from_mp3(audio_file)
|
| 47 |
audio_segments.append(audio_segment)
|
| 48 |
transcript += f"**{item.speaker}**: {item.text}\n\n"
|
| 49 |
os.remove(audio_file) # Clean up temporary audio file
|
|
|
|
| 76 |
4. Click "Generate" to create your podcast
|
| 77 |
5. Listen to the generated audio and review the transcript
|
| 78 |
|
| 79 |
+
Note: This tool uses the LLaMa 3.1 70B model for script generation and Voice RSS for text-to-speech conversion. The input is limited to 2048 tokens to ensure compatibility with the model. The podcast features John (Male, American accent) and Lily (Female, British accent) as hosts.
|
| 80 |
"""
|
| 81 |
|
| 82 |
iface = gr.Interface(
|