Update app.py
Browse files
app.py
CHANGED
@@ -95,5 +95,10 @@ def index():
|
|
95 |
return render_template('index.html', error=str(e), voices=tts_provider.all_voices.keys())
|
96 |
return render_template('index.html', voices=tts_provider.all_voices.keys())
|
97 |
|
|
|
|
|
|
|
|
|
|
|
98 |
if __name__ == "__main__":
|
99 |
app.run(host='0.0.0.0', port=5000)
|
|
|
95 |
return render_template('index.html', error=str(e), voices=tts_provider.all_voices.keys())
|
96 |
return render_template('index.html', voices=tts_provider.all_voices.keys())
|
97 |
|
98 |
+
@app.route('/audio/<filename>')
|
99 |
+
def serve_audio(filename):
|
100 |
+
audio_path = Path(tempfile.gettempdir()) / filename
|
101 |
+
return send_file(audio_path, mimetype='audio/mpeg')
|
102 |
+
|
103 |
if __name__ == "__main__":
|
104 |
app.run(host='0.0.0.0', port=5000)
|