1

I have reference code (from the attached url) to convert speech to text with direct audio file. Convert sound from website to text in python

I tried passing the direct audio_url as string( "https://1filedownload.com/wp-content/uploads/2020/09/01.mp3") but it is not reading from the url.

Is there a way to convert the audio directly without downloading and then convert?

yivas81730
  • 23
  • 2
  • Are you looking to just bypass creating a temporary file? – JonSG Nov 24 '21 at 20:17
  • Yes, I want to directly read audio file and convert it into text rather then downloading and convert.... I have long list of audio files in azure blob storage and I can't download each and every file and then covert then remove local file. This will consume time and wasting unncessary temp space. Do you have any idea how can audio file be read and convert? – yivas81730 Nov 24 '21 at 20:23
  • Check out `io.BytesIO(resp.content)` – JonSG Nov 24 '21 at 22:32
  • 1
    No point of using the io.BytesIO (https://stackoverflow.com/a/60846477/17391753) – yivas81730 Nov 25 '21 at 15:09

0 Answers0