Tristophis
Posts: 1
Joined: Wed Jun 10, 2015 4:24 am

Automated Audio Recording/Uploading

Wed Jun 10, 2015 5:25 am

Hello,

I have never owned/used a Pi, so this is my first project. It may be a little ambitious, as I am unsure of how a lot of it would work.

Here's the idea: every week I record the audio for Sunday sermons at church. I would like to automate this process using the Pi.

Here's how I see the process working:

1. The Pi would have an audio input from the sound board (I'm thinking I'll use this for the input:http://www.amazon.com/Syba-SD-CM-UAUD-A ... f=pd_ybh_3)
2. Every Sunday, it would begin and end recording at a very specific time (maybe specified in a text file on the Pi)
3. When the recording stops, the audio file would be uploaded to DropBox, from which I could download and edit the audio
4. The audio file would then be deleted from the Pi's storage, as to not take up unnecessary space

An even more advanced version of this project could include a touchscreen, so that you could start/stop the recording manually.

I would like to do the programming in Python, which I am currently learning (I'm already a programmer, so I'm learning quickly).

I am pretty uncertain about how the audio would actually be processed/recorded/saved. Since it doesn't have a sound card, how are you able to record anything?

I'm definitely more of a software than hardware guy, so any suggestions/tips are welcome!

Thanks!

troombatzia
Posts: 501
Joined: Fri Jun 29, 2012 4:27 pm

Re: Automated Audio Recording/Uploading

Wed Jun 10, 2015 8:47 am

Tristophis wrote:I am pretty uncertain about how the audio would actually be processed/recorded/saved. Since it doesn't have a sound card, how are you able to record anything?
viewtopic.php?p=314611
English isn’t my first language, so please excuse any mistakes.

RaspberrianOfPi
Posts: 1
Joined: Fri Feb 05, 2016 11:10 pm

Re: Automated Audio Recording/Uploading

Fri Feb 05, 2016 11:19 pm

I'm currently trying to accomplish a similar project. What did you end up doing as a solution for recordings?

lostcaggy
Posts: 7
Joined: Wed May 16, 2012 8:56 pm

Re: Automated Audio Recording/Uploading

Fri Feb 12, 2016 11:16 pm

I've recently set up the cirrus logic audio board for recording and playback. Good clear sound.

DanRichNC
Posts: 1
Joined: Sun Mar 27, 2016 8:22 am

Re: Automated Audio Recording/Uploading

Sun Mar 27, 2016 9:15 am

Hey, I've recently achieved the exact setup you were looking for and our sermons are being recorded regularly with minimal effort. Here's how I do it.

I installed an icecast2 server with darkice. This allows us to have a live stream of the service (or whatever comes out of the soundboard). Darkice has a config file that has the option for a dump file of the stream. That is where the raw Sunday service recordings go.

I made a little script that timestamps and copies the dump file after darkice closes, otherwise it would get overwritten every time darkice cranks up.

I installed apache2 and the timestamp script copies the raw recordings to it's root folder. I had to port forward the 3 ports I use on the router at church. One for port 80 so i can download the recordings from anywhere(ddclient and a Dyn account for the domain), one for ssh access, and one for the live stream. I was going to use rsync to automagically move the recordings to my home server, but it wouldn't have saved much time. I just download the raw recording when I get home, trim with audacity, and upload to the church website.

The recordings are scheduled with /etc/crontab, but I soon realized that there were other times that I or someone else wanted to test or listen in. Since the Pi is headless, I wrote a really simple web interface with php(which I also installed). It's nice to be able to manage it from my cell phone from anywhere.

A couple things to note. The Pi obviously doesn't have a sound card, so I bought a headphone/mic USB jack at Micro Center for $12. Our soundboard has an RCA red and white out cable that turns into a standard 3.5mm headphone jack. I had to mess with alsamixer a bit to make it sound good. I have my mic capture at %69 and had to mute the auto gain control. Also I just use the SD card to boot and run everything else off of an 8G USB thumb-drive. I've had way too many headaches with SD card corruption. Once I got everything the way I wanted it, I made sure to dd the disk image someplace safe in case someone pulled the power by accident.

I think that's about it. I'm no professional programmer, and I'm sure someone would laugh at my scripting skills, but the setup has been running smoothly since the beginning of the year. I'll bet this is a common problem, so I'll post a link to the disk image when I get the chance. Happy Easter!

mannmjr
Posts: 1
Joined: Wed Jul 20, 2016 11:30 pm

Re: Automated Audio Recording/Uploading

Fri Jul 22, 2016 10:31 am

I am trying to do something very similar. However, I didn't want to use a cron job to just start recording at, say Sundays at 10am, because we have services and one-off events at different times and different days of the week that I want to capture as well.

I owe a lot to this Stack Overflow thread for this project. It helped me create a script that runs Sox (actually, the rec command) over and over until it detects that there is audio to record. Recording then stops after a period of silence has been detected. In this setup, that means it starts recording when the church sound system is turned on, and stops when it is turned off. I also added an upper limit of 4 hours of recording, just in case the sound system is left turned on by mistake at the end of a service.

Here is the recording command from my script:

Code: Select all

rec filename.mp3 silence 1 0:00:05 0.01% 1 0:00:05 0.01% trim 0 4:00:00
.

Once a recording has been made, I use this Dropbox Uploader script to upload it to Dropbox so I can easily access the audio file from home to edit it before putting it on the website.

After lots of testing this week it seems to be working well. Hopefully it will work this Sunday!

Return to “Graphics, sound and multimedia”