mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-29 22:51:58 +02:00
Update README.md
This commit is contained in:
parent
d3747c57f2
commit
ba670932d5
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user