mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.4K
active users

#pyaudio

0 posts0 participants0 posts today
Jochie 👨🏻‍💻🏳️‍🌈<p>Today's minor software victory involves arm-wrestling with the portaudio wrapper for Python.</p><p>The hotplug branch (referenced in <a href="https://github.com/PortAudio/portaudio/wiki/HotPlug" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/PortAudio/portaudio</span><span class="invisible">/wiki/HotPlug</span></a>) of the C level portaudio code seems to be a dead-end, so that's a bumner.</p><p>Experimentally I observed that calling terminate() twice on the PyAudio() object gets me a fresh list without restarting the program (a TUI) even though, as far as I can tell, I only call open() once. Some ref-count bug?</p><p>I'll take the win 🔊</p><p><a href="https://strangeweb.page/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://strangeweb.page/tags/PyAudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyAudio</span></a> <a href="https://strangeweb.page/tags/PortAudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PortAudio</span></a></p>
coucou<p><a href="https://toot.community/tags/pyaudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyaudio</span></a> and <a href="https://toot.community/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> for audio <a href="https://toot.community/tags/fft" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>fft</span></a><br><a href="https://github.com/aiXander/Realtime_PyAudio_FFT" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/aiXander/Realtime_P</span><span class="invisible">yAudio_FFT</span></a></p>
coucou<p>Writing your own <a href="https://toot.community/tags/audio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>audio</span></a> analyzer using pyaudio-analysis <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144610" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">journals.plos.org/plosone/arti</span><span class="invisible">cle?id=10.1371/journal.pone.0144610</span></a><br>(possibly in combination with <a href="https://toot.community/tags/pyaudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyaudio</span></a>) <br><a href="https://toot.community/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://toot.community/tags/audioanalysis" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>audioanalysis</span></a></p>
TOV<p>Both PyAudio and SoundDevice are Python libraries for audio input and output. What makes them different?</p><p>PyAudio provides direct bindings to the PortAudio library, giving you more control over audio parameters and access to lower-level functionality.</p><p>SoundDevice offers a simpler, more Pythonic interface that works seamlessly with NumPy arrays, making it convenient for processing audio data. SoundDevice is also actively maintained.</p><p><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/pyaudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyaudio</span></a> <a href="https://fosstodon.org/tags/sounddevice" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sounddevice</span></a> <a href="https://fosstodon.org/tags/NumPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NumPy</span></a></p>
TOV<p>I spent a few hours on New Years Eve trying to listen to my USB microphone using Python3, PyQt5 and pyAudio. I can play WAV files using pyAudio, but fetching my microphone is becoming a bit challenging.</p><p>Lets see if I can get this working New Years Day. Time to read the documentation. <br><a href="https://people.csail.mit.edu/hubert/pyaudio/docs/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">people.csail.mit.edu/hubert/py</span><span class="invisible">audio/docs/</span></a></p><p><a href="https://fosstodon.org/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/python3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python3</span></a> <a href="https://fosstodon.org/tags/pyqt" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyqt</span></a> <a href="https://fosstodon.org/tags/pyqt5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyqt5</span></a> <a href="https://fosstodon.org/tags/pyaudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyaudio</span></a> <a href="https://fosstodon.org/tags/portaudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>portaudio</span></a> <a href="https://fosstodon.org/tags/USB" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>USB</span></a> <a href="https://fosstodon.org/tags/USB3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>USB3</span></a> <a href="https://fosstodon.org/tags/microphone" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>microphone</span></a> <a href="https://fosstodon.org/tags/WAV" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WAV</span></a></p>
Alexandre B A Villares 🐍<p>I have created this discussion at the <a href="https://ciberlandia.pt/tags/py5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>py5</span></a> forum... To collect <a href="https://ciberlandia.pt/tags/PyAudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyAudio</span></a> or other audio examples, If anyone else wants to post other experiments...</p><p><a href="https://github.com/py5coding/py5generator/discussions/282" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/py5coding/py5genera</span><span class="invisible">tor/discussions/282</span></a></p><p>wink wink <span class="h-card"><a href="https://mastodon.social/@kantel" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>kantel</span></a></span> <span class="h-card"><a href="https://vis.social/@TomLarrow" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>TomLarrow</span></a></span> <span class="h-card"><a href="https://fosstodon.org/@ericof" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>ericof</span></a></span> <span class="h-card"><a href="https://mastodon.social/@rzeta0" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>rzeta0</span></a></span> <br><a href="https://ciberlandia.pt/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://ciberlandia.pt/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CreativeCoding</span></a></p>
Alexandre B A Villares 🐍<p>Tomorrow or maybe during the week I should read this tutorial mixing <a href="https://ciberlandia.pt/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://ciberlandia.pt/tags/PyAudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyAudio</span></a> and <a href="https://ciberlandia.pt/tags/PySimpleGUI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PySimpleGUI</span></a> ... <a href="https://k3no.medium.com/integrating-pyaudio-pysimplegui-5fa342b1e113" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">k3no.medium.com/integrating-py</span><span class="invisible">audio-pysimplegui-5fa342b1e113</span></a></p>
Alexandre B A Villares 🐍<p>As usual, I have no idea of what I'm doing 😂​ <a href="https://ciberlandia.pt/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://ciberlandia.pt/tags/Processing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Processing</span></a> <a href="https://ciberlandia.pt/tags/py5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>py5</span></a> + <a href="https://ciberlandia.pt/tags/PyAudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyAudio</span></a> microphone listening</p>
Holly A. Gultiano<p>Tone generation with <a href="https://synapse.cafe/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> turns out to be relatively simple. I found this short code on a blog <a href="https://raw.githubusercontent.com/makermovement/3.5-Sensor2Phone/master/generate_any_audio.py" rel="nofollow noopener" target="_blank"><span class="invisible">https://</span><span class="ellipsis">raw.githubusercontent.com/make</span><span class="invisible">rmovement/3.5-Sensor2Phone/master/generate_any_audio.py</span></a> [edit: the variable Fs might need to be changed to sampling_rate in the non-sine waves]</p><p>which can be tweaked fairly intuitively (er, for me, someone who has been playing music for over 20 years): change "samples" number for different length files, add more for loops for different sequences, use different functions for different waveforms.</p><p>Since the waveforms are generated by values in lists being packed into byte sequences, I imagine someone could use spike data (maybe transformed a bit to be in range [-128, 127]) instead of something that generates a sinewave or whatever.</p><p>My original idea was to have the spikes trigger a wav file to be played, to make a spiking drum machine, which seems possible with <a href="https://synapse.cafe/tags/pygame" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pygame</span></a>, <a href="https://synapse.cafe/tags/pyaudio" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyaudio</span></a>, or a module called playsound, but I realized it would require stitching them together and also generating silence, so I went for the simpler method that's more like a synthesizer</p>