Tuesday, December 26, 2023

Edit-as-you-go Sound Recorder

My friend, Mason, is an actor in film, stage, and voice projects. One of his enjoyed past times is to record audio books. Y'know, long ones, the ones in the public domain (his still sound great though). All from the kindness of his heart. The problem is that his typical workflow included recording long takes often with restarts or variations. Then, when he went to edit the hours and hours of audio, it would take him a really long time to narrow things down to the ones he really wanted. All this and he still had the other audio processing he likes to do before he publishes. 

As we were hanging out, I had the idea that one could substantially cut down on time if you make the decision about selections as you record them. More often than not, he has a good ideas what recording segments he thinks will work well. This is when I got to thinking about the Edit-as-you-go Sound Recorder (I'll call it EAYG). The idea was simple, write a program that would record your microphone and then when you knew you had something you liked, you would hit a keyboard shortcut and it would automatically be stored for you. Another benefit is that each clip already has a natural cutting point by virtue of being a self-contained clip or segment. Using ChatGPT a bit (haven't done much with sound in Python), and after putting things together for a couple hours, I had a working version of the program with managed memory buffers, recording flow, and even restoring your last recording if the program crashes mid-take. 

The program records audio at 96kHz 32-bit. This could be easily changed in the code, and maybe from a preference menu or something. 

Another note, Mason is always inside his recording booth, and not next to his computer. Using a simple wireless keypad, and the program shortcuts, he can trigger whatever action he wants to have happen to the clip and get audible confirmation through his headphones. 

You can checkout Mason's stuff here:

Mason Willard - Stage, Film, and Voice Actor
Youtube: https://www.youtube.com/@_roscius
Email: [email protected]





Instructions

Before recording, choose session directory. This directory will be the location of one or two more directories after you finish recording your session (based on good/bad takes).

Next, choose your recording device or interface.

To begin recording, start the session (F10). Once the recording has started it is now recording audio. When you are happy with the take, click Finish Good Take (F11).
If you don't like the take, click Finish Bad Take (F12).
If you are not sure about the take, click Replay Last Take and you can listen to the take on repeat, then choose Finish Good Take or Finish Bad Take.

Choosing Finish Good Take or Finish Bad Take, saves the audio segment in a respective folder, and then begins recording again automatically. 

When you are done with the session, click End Session (F10). The last segment of recording prior to the session ending will be discarded.

Your good takes will all be in a folder called /recorder-keep and the rejected audio files are in a folder called /recorder-discard. All files have been named using timestamps so they are sortable. The location of these folders can be selected prior to starting a session.

Keyboard Shortcuts

These can be changed in the code easily enough. The reason behind these was specific to the original use case of using a mini wireless keyboard to trigger recordings from inside the recording booth.

Assembly in Audacity

For quick assembly in Audacity, you can select all your good takes and drag them into a new session. Next, select them all and choose Tracks from the top menu. Then choose Align Tracks -> Align End to End.




Also, it may be helpful to turn on ripple edit so as you modify each take, the other audio files don't fall behind. You can enable this by going to Edit -> Preferences and the go to Track Behaviors and check the box "Editing a clip can move other clips"








More Help or Desired Changes

The code is available as is. If you find bugs, please submit them on GitHub and I will address them as I am able and time permits. In the event you would like bugs fixed sooner, customizations, or personal help setting up and using the program, I can be available to help at my hourly rate. 

Repo:

No comments: