quiero leer el archivo de audio de s3 directamente en python.
Primero, grabo audio, aquí está mi configuración de blob
blob = new Blob(audioChunks,{type: 'audio/wav'});luego usando django subí este archivo a s3
req=request.POST.get('data') d=req.split(",")[1] file_content_io = BytesIO(base64.b64decode(d)) s3_path='audio/file_name_{}.wav'.format(random.randint(0,99)) default_storage.save(s3_path, file_content_io)luego descargo el archivo directamente
from scipy.io.wavfile import read from io import BytesIO from urllib.request import urlopen with urlopen(file) as response: audio=BytesIO(response.read()) speech_array=read(audio)Ahora me está dando el siguiente error
ValueError: File format b'OggS' not understood. Only 'RIFF' and 'RIFX' supported.¿Alguna solución? También probé librosa, eso tampoco funciona. Lo único que quiero leer el archivo directamente sin guardarlo en el disco