Python Forum
Reading a directory and outputting as sound - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Reading a directory and outputting as sound (/thread-34431.html)



Reading a directory and outputting as sound - loungeroom - Jul-30-2021

Hi everyone,

I'm a total beginner when it comes to code, and wondering if Python would be the best solution for this problem.

I use Audacity to convert files to sound using the import RAW data method, however I would like to set up an art installation with a Raspberry Pi in which when a USB drive is inserted it looks at the devices files and outputs everything as sound, one file at a time, without any user input. When the device is removed, I would like the sound to stop.

I have been looking into audioop, which i think can read non sound files as sound and output them, but I have no idea how to implement this as i have only had experience with visual interfaces.

Again, i'm a beginner and thanks for any suggestions/help.

I did post this on the Raspberry Pi forum here:

https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=316515&e=1&view=unread#unread


Thankyou

Luke