Update main.py
Browse files
main.py
CHANGED
|
@@ -842,16 +842,6 @@ def speak_notes(notes_id):
|
|
| 842 |
new_credits = profile_res.data['credits'] - 5
|
| 843 |
supabase.table('profiles').update({'credits': new_credits}).eq('id', user.id).execute()
|
| 844 |
|
| 845 |
-
# --- Return the audio file directly ---
|
| 846 |
-
# Set headers for browser playback/download
|
| 847 |
-
"""
|
| 848 |
-
return send_file(
|
| 849 |
-
io.BytesIO(audio_bytes),
|
| 850 |
-
mimetype=content_type,
|
| 851 |
-
as_attachment=False, # Play inline if possible
|
| 852 |
-
download_name=f'notes_{notes_id}.mp3'
|
| 853 |
-
)
|
| 854 |
-
"""
|
| 855 |
# OR: Return the URL
|
| 856 |
return jsonify({'success': True, 'audio_url': audio_url})
|
| 857 |
|
|
|
|
| 842 |
new_credits = profile_res.data['credits'] - 5
|
| 843 |
supabase.table('profiles').update({'credits': new_credits}).eq('id', user.id).execute()
|
| 844 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 845 |
# OR: Return the URL
|
| 846 |
return jsonify({'success': True, 'audio_url': audio_url})
|
| 847 |
|