Spaces:
Running
Running
Update conver.py
Browse files
conver.py
CHANGED
@@ -146,6 +146,9 @@ class URLToAudioConverter:
|
|
146 |
text = " ".join(words[: self.config.max_words])
|
147 |
|
148 |
conversation_json = self.extract_conversation(text)
|
|
|
|
|
|
|
149 |
self.llm_out = conversation_json
|
150 |
audio_files, folder_name = await self.text_to_speech(
|
151 |
conversation_json, voice_1, voice_2
|
@@ -153,4 +156,4 @@ class URLToAudioConverter:
|
|
153 |
|
154 |
final_output = os.path.join(folder_name, "combined_output.wav")
|
155 |
self.combine_audio_files(audio_files, final_output)
|
156 |
-
return final_output
|
|
|
146 |
text = " ".join(words[: self.config.max_words])
|
147 |
|
148 |
conversation_json = self.extract_conversation(text)
|
149 |
+
conversation_text = "\n".join(
|
150 |
+
f"{turn['speaker']}: {turn['text']}" for turn in conversation_json["conversation"]
|
151 |
+
)
|
152 |
self.llm_out = conversation_json
|
153 |
audio_files, folder_name = await self.text_to_speech(
|
154 |
conversation_json, voice_1, voice_2
|
|
|
156 |
|
157 |
final_output = os.path.join(folder_name, "combined_output.wav")
|
158 |
self.combine_audio_files(audio_files, final_output)
|
159 |
+
return final_output,conversation_text
|