Update main.py
Browse files
main.py
CHANGED
|
@@ -963,14 +963,10 @@ def speak_notes(notes_id):
|
|
| 963 |
file_path = f'{user.id}/{str(notes_id)}.mp3'
|
| 964 |
|
| 965 |
try:
|
| 966 |
-
#
|
| 967 |
-
from io import BytesIO
|
| 968 |
-
audio_file = BytesIO(audio_bytes)
|
| 969 |
-
|
| 970 |
-
# Upload audio file
|
| 971 |
upload_res = supabase.storage.from_(bucket_name).upload(
|
| 972 |
path=file_path,
|
| 973 |
-
file=
|
| 974 |
file_options={"content-type": "audio/mpeg"}
|
| 975 |
)
|
| 976 |
|
|
|
|
| 963 |
file_path = f'{user.id}/{str(notes_id)}.mp3'
|
| 964 |
|
| 965 |
try:
|
| 966 |
+
# Upload audio file - pass bytes directly
|
|
|
|
|
|
|
|
|
|
|
|
|
| 967 |
upload_res = supabase.storage.from_(bucket_name).upload(
|
| 968 |
path=file_path,
|
| 969 |
+
file=audio_bytes,
|
| 970 |
file_options={"content-type": "audio/mpeg"}
|
| 971 |
)
|
| 972 |
|