Update README.md

This commit is contained in:
Kavi Askholm Mellerup 2025-06-03 14:26:54 +02:00 committed by GitHub
parent d3747c57f2
commit ba670932d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -105,10 +105,11 @@ import requests
AUDIO_URL = "<insert your audio url here>" AUDIO_URL = "<insert your audio url here>"
# Process a whole file # Process a whole file from a url
results = api.process_url(AUDIO_URL) results = api.process_url(AUDIO_URL)
# Or, load audio and compute spectrograms # Or, load audio and compute spectrograms
# 'requests.get(AUDIO_URL).content' fetches the raw bytes. You are free to use other sources to fetch the raw bytes
audio = api.load_audio(io.BytesIO(requests.get(AUDIO_URL).content)) audio = api.load_audio(io.BytesIO(requests.get(AUDIO_URL).content))
spec = api.generate_spectrogram(audio) spec = api.generate_spectrogram(audio)