rairo commited on
Commit
e3af5d2
·
verified ·
1 Parent(s): a632de5

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -6
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
- # Convert bytes to BytesIO object for Supabase upload
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=audio_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