Spaces:
Sleeping
Sleeping
Lakpriya Seneviratna
commited on
Commit
·
2d6668a
1
Parent(s):
90bc8ef
chore: Update tts_per_sentence function to use correct output file path
Browse files
app.py
CHANGED
@@ -235,7 +235,7 @@ def tts_per_sentence(sentences, output_folder, silence_duration=1000):
|
|
235 |
|
236 |
for index, sentence in enumerate(sentences):
|
237 |
output_file = f'{output_folder}/voiceover_{index}.wav'
|
238 |
-
text_to_speech_using_speecht5(sentence,
|
239 |
audio = AudioSegment.from_wav(output_file)
|
240 |
silence = AudioSegment.silent(duration=silence_duration)
|
241 |
audio_with_silence = audio + silence
|
@@ -523,7 +523,7 @@ def generate_video():
|
|
523 |
sentences = nltk.sent_tokenize(selftext)
|
524 |
|
525 |
# Generate audio for each sentence and get durations
|
526 |
-
audio_files, audio_durations = tts_per_sentence(sentences,
|
527 |
|
528 |
# Create and save the video
|
529 |
video_filename = "reddit_post_video_cv2.mp4"
|
|
|
235 |
|
236 |
for index, sentence in enumerate(sentences):
|
237 |
output_file = f'{output_folder}/voiceover_{index}.wav'
|
238 |
+
text_to_speech_using_speecht5(sentence, output_file)
|
239 |
audio = AudioSegment.from_wav(output_file)
|
240 |
silence = AudioSegment.silent(duration=silence_duration)
|
241 |
audio_with_silence = audio + silence
|
|
|
523 |
sentences = nltk.sent_tokenize(selftext)
|
524 |
|
525 |
# Generate audio for each sentence and get durations
|
526 |
+
audio_files, audio_durations = tts_per_sentence(sentences, audio_output_folder)
|
527 |
|
528 |
# Create and save the video
|
529 |
video_filename = "reddit_post_video_cv2.mp4"
|