Reading wave from memory
See original GitHub issueThere is a fork of audioreader
that can read a wave file directly from memory like here https://github.com/jksinton/littlesleeper2/blob/master/littlesleeper.py#L453
So like
print "Processing MP3 queue buffer\n"
# this is essentially a while-true loop
for mp3data, timestamp in StreamBufferReader(self.queue_read):
t1 = time.time() # start time used to calculate loop processing time below
signaldata = None
timestamp_str = timestamp.strftime("%Y-%m-%d %H:%M:%S.%f")
try:
signaldata = audioread.decode(StringIO(mp3data))
except (audioread.NoBackendError, audioread.ffdec.ReadTimeoutError):
print timestamp_str,"\tDecode error. Setting default value."
It is it possible to add a new interface to librosa.open
to support this streaming mode?
See here about this https://github.com/beetbox/audioread/issues/53
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to play WAV data right from memory? - python
I suppose you are using the wave library, right? The docs say: wave.open(file[, mode]). If file is a string, open the file by...
Read more >Reading a large .wav file - Google Groups
I'm trying to read a large .wav file (35 minutes long, 1.12Gb, sample rate 96000 Hz, ... Reached total allocation of 8072Mb: see...
Read more >How brain waves guide memory formation | MIT News
A new study from MIT neuroscientists finds that neurons hum at different frequencies to tell the brain which memories it should store.
Read more >Wave: Memory - YouTube
Understanding the Wave memory for steno notes and timestamps• Memory Size in Strokes and Pages• Memory indicator on the display screen• What ...
Read more >wave — Read and write WAV files — Python 3.11.1 ...
Source code: Lib/wave.py The wave module provides a convenient interface to the WAV sound format. Only files using WAVE_FORMAT_PCM are supported.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for noting this.
Since #845 (and merging #847) , we’re deprioritizing audioread backends (and hope to drop it entirely at some point). Soundfile already supports this kind of streaming directly, and we have documentation illustrating how to do it here, so I don’t see a real need for adding this functionality. Unless I’m misunderstanding your comment?
@bmcfee yes of course due to patents issues it makes sense. Okay thank you I think using
soundfile
it is enough for this issue, thank you. The mp3 decoding to wav can be done in a different way.