Update app.py
Browse files
app.py
CHANGED
@@ -150,10 +150,10 @@ if STATEMENT:
|
|
150 |
# Generate speech
|
151 |
speech = tts(text)
|
152 |
|
153 |
-
st.sidebar.write(speech.keys())
|
154 |
|
155 |
# Access the audio waveform from the dictionary (assuming key name is 'waveform')
|
156 |
-
audio_data = speech['waveform']
|
157 |
|
158 |
# Optional: Save the audio to a file (uncomment if needed)
|
159 |
sd.write(audio_data, samplerate=speech['sampling_rate']) # Adjust samplerate if necessary
|
|
|
150 |
# Generate speech
|
151 |
speech = tts(text)
|
152 |
|
153 |
+
# st.sidebar.write(speech.keys())
|
154 |
|
155 |
# Access the audio waveform from the dictionary (assuming key name is 'waveform')
|
156 |
+
audio_data = speech['audio'] # speech['waveform']
|
157 |
|
158 |
# Optional: Save the audio to a file (uncomment if needed)
|
159 |
sd.write(audio_data, samplerate=speech['sampling_rate']) # Adjust samplerate if necessary
|