Calling all macro users

Comments about LibriVox? Suggestions to improve things? News?
InTheDesert
Posts: 7658
Joined: August 20th, 2019, 8:25 pm

Post by InTheDesert »

If it's useful, here's the macro I use that does everything automatically for me:

(you just have to cut the track at the start and end so that there is no silence on either side - it will add the LV required silences)

Code: Select all

SelectTracks:Mode="Set" Track="1" TrackCount="1"
RemoveTracks:
SelectAll:
Join:
Select:End="0" Mode="Set" Start="0"
SelEnd:
FilterCurve:f0="50" f1="60" f2="65" f3="70" f4="80" f5="90" f6="100" FilterLength="8191" InterpolateLin="0" InterpolationMethod="B-spline" v0="-120" v1="-50" v2="-24" v3="-12" v4="-4" v5="-1" v6="0"
TruncateSilence:Action="Compress Excess Silence" Compress="70" Independent="0" Minimum="2.5" Threshold="-25" Truncate="1.5"
SelectTime:End="0.75" RelativeTo="ProjectStart" Start="0"
Copy:
CursProjectStart:
Paste:
SelectTime:End="0.75" RelativeTo="ProjectStart" Start="0"
Silence:Use_Preset="<Current Settings>"
Select:End="0" Mode="Set" Start="0"
SelEnd:
Compressor:AttackTime="0.74" NoiseFloor="-40" Normalize="1" Ratio="5" ReleaseTime="1.9" Threshold="-5" UsePeak="1"
Normalize:ApplyGain="1" PeakLevel="-0" RemoveDcOffset="1" StereoIndependent="0"
Compressor:AttackTime="0.6" NoiseFloor="-25" Normalize="0" Ratio="3.5" ReleaseTime="1.9" Threshold="-14" UsePeak="0"
BassAndTreble:Bass="-1" Gain="0" Link_Sliders="0" Treble="0"
NoiseGate:attack="200" decay="50" gate-freq="0" hold="0" level-reduction="-3.5" mode="Gate" stereo-link="DoNotLink" threshold="-25"
LoudnessNormalization:DualMono="1" LUFSLevel="-19" NormalizeTo="0" RMSLevel="-20" StereoIndependent="0"
SelectTime:End="-5" RelativeTo="ProjectEnd" Start="0"
Silence:Use_Preset="<Current Settings>"
ZoomNormal:
Save:
Female Scripture Characters by William Jay (1769 - 1853) 97% 1 left! "The Penitent Sinner Part 2"
St. Augustine (Vol.6 Psalms 126-150) 96% 2 left!
PL pls: DPL DPL 21 43 27-28
annise
LibriVox Admin Team
Posts: 38635
Joined: April 3rd, 2008, 3:55 am
Location: Melbourne,Australia

Post by annise »

Checker may well be a macro - I don't know, I didn't write it and I'm not really interested in finding out. But it is an "Advisory" macro, it does not change the file at all - and this was deliberate. Readers need not even use once they have sorted out the "tech bits"

So there is no comparison between it and what you are talking about doing. And you are just complicating a simple process called using your ears - if it sounds wrong it probably is for that bit of reading, if it sounds OK it probably is.

Anne
lurcherlover
Posts: 1206
Joined: November 10th, 2016, 3:54 am
Location: LONDON UK

Post by lurcherlover »

annise wrote: January 20th, 2022, 6:13 pm Personal opinion
If you need to depend on all these things why bother reading at all - just use text to voice software. It would be a lot less work
I prefer reading that sound like someone is reading me a story -
I like hearing they are breathing not dead,
I like the slight slowdown when they come across a difficult word.
I like variations between phrases and sentences etc depending on the story they are telling me,
I like the different accents,

And that is why I'm here.
Editing is like the finishing you apply to new woodwork and to dressmaking - it's not "productive" but it does make a big difference to the finished product

Anne
Yes, I do also agree entirely with this, and the time I spend editing is creative and I LIKE doing it, so I do not want to use macros for this purpose. I also want to listen several times to what I have recorded, because quite often I think it a load of rubbish, and then re-record with different emphasis and timings on gaps and the speed of reading. Macros cannot discern whether a good job has been accomplished, or that it may need re-doing to make it just that bit better.

And I have been editing audio since about 1975 (from tape then- to digital now) and I have no wish for the computer to take over completely, they already have too much power and govern people's lives far too much as it is! Call me a Luddite if you want, but that's how I see it.
ChrisGreaves
Posts: 640
Joined: December 31st, 2021, 4:07 pm
Location: ///paused.undefined.exposed

Post by ChrisGreaves »

InTheDesert wrote: January 20th, 2022, 10:42 pm If it's useful, here's the macro I use that does everything automatically for me:
InTheDesert (where I was raised!), YES, this is tremendously useful to me, but not for the reason you might think.

(1) It is coded in a programming language, php/NyQuist?, which I can read, and I assume it works, so it represents a concise description of a well-defined task.
(2) Because you use the macro, the task is probably useful to you, and hence, to other people; further you can describe its function in detail.
(3) It challenges me to find and implement the same features in Audacity's macro command set; that is, I can use it as a vehicle to guide my training.

Each of those points is of great value, because they provide a structure for my learning.

I am still unsure of how to continue with promoting macros. I do not want this thread to host some hundred or so macros, and yet they have to be stored somewhere. In the meantime, your contribution will fuel the fires of learning in me for a few more days.
So THANKS! :birthday:

(4) That you are prepared to post the macro here suggests to that you are willing to make your efforts available to other members of LibriVox.

Cheers and thanks
Chris
I adopt YOUR orphaned chapters, for FREE!
audiomike
Posts: 51
Joined: May 27th, 2016, 10:26 am
Location: Mid-Michigan

Post by audiomike »

Chris,

While I am in favor of using macros, I'm not in favor of the example you posted. I loaded a one minute test into Audacity that Checker said had a moderate amount of background noise, up to -39 dB actually. I applied the example macro and Checker passed it with no noise. The reason being that the macro actually put "silence" at the beginning and end of the recording, greater than -120 dB. We don't need "silence", we need 5 seconds of room tone; the sound the mic picks up when no one is talking. I have also seen this in some one minute tests where people would just take the last 5 seconds and amplify it down to nothing because that's what they thought the instructions said to do. The recording would pass Checker but it was still full of noise.

I'd like to add that macros are also good as storage for effects settings. Let's say you find a sequence of effects and associated settings the work really well for a particular recording setup. Then you change something in your recording stream, a different mic for example. You find that you need to adjust all the settings in your effects for the new mic. Great, but what happens if you want to go back to the old mic? Unless you wrote them down, you've lost all the settings you had before. If you would have saved the effects and settings as a macro, you can always go back and find out what they were. I've done this many many times and found it to be a very useful trick.

Mike
MichaelMaggs
Posts: 534
Joined: April 27th, 2012, 1:10 am
Location: UK
Contact:

Post by MichaelMaggs »

Chris

I agree with you that macros can be very useful. I use a macro I call 'finalise' at the end of manual editing to do a series of standard processing steps on the entire track before export:
  • ReplayGain
    Compressor
    Noise reduction
    ReplayGain
    Amplify
The first ReplayGain sets a standard level of gain for compression and noise reduction to operate on, while the second ReplayGain re-adjusts to -3dB which seems to be the recommendation to finish up with a volume that will pass the Checker tests. In practice, I find that often comes out on the low side, especially with long tracks, and a little amplification at the end reduces the proportion of "volume too low" errors. Sometimes the processing needs tweaks, but in general it does save a lot of time on each track.
Last edited by MichaelMaggs on January 21st, 2022, 10:39 am, edited 2 times in total.
MichaelMaggs
Posts: 534
Joined: April 27th, 2012, 1:10 am
Location: UK
Contact:

Post by MichaelMaggs »

Like you, I use Truncate Silence frequently, but not to make all the spaces between sentences all the same length. I prefer not to stop and re-start recording too often, given the time and effort needed to avoid an audible click. When I need to read ahead or otherwise pause I'll just leave the recording running, capturing a minute or two's silence. Once the track is complete, running Truncate Silence over it with a 2s setting instantly gets rid of those long silences that I'd otherwise need to listen to or scroll through in editing. The 2s gaps are mostly obvious during editing, as they are a little longer than a natural sentence pause, and it's easy just to cut down the gap to whatever seems natural at that point. Cutting out recorded silence is easier than adding it in.

Since running Truncate Silence over the whole of a track will remove the 5s of silence needed at the end, I run Truncate Silence within a macro that as a first step excludes the final 5s from the selection so that Truncate Silence won't operate on that.
Last edited by MichaelMaggs on January 21st, 2022, 12:17 pm, edited 2 times in total.
MichaelMaggs
Posts: 534
Joined: April 27th, 2012, 1:10 am
Location: UK
Contact:

Post by MichaelMaggs »

In answer to your question about the best place to store sample macros, that could perhaps be done on the Librivox wiki: https://wiki.librivox.org/index.php?title=Main_Page
ChrisGreaves
Posts: 640
Joined: December 31st, 2021, 4:07 pm
Location: ///paused.undefined.exposed

Post by ChrisGreaves »

ChrisGreaves wrote: January 20th, 2022, 7:20 am I am establishing a set of macro-commands in Audacity 3.1.3 ...
I have to date established and tested 36 macros suitable for work in the recording and cleanup of Text recorded in Audacity 3.1.3.
I am storing public reference documentation temporarily on web pages on my site.

My simplest macro - assigned to a shortcut key to save even more time - is a little "Delete And Play on"
My most ambitious so far is described below.

In the meantime I welcome a volunteer who is curious/interested/tired of doing boring and repetitive work to help me test not only the macros themselves, but the documentation as it will be used by an (initially) novice user.

A major step. I have a BATch file and an Audacity macro to assemble all chapters of a book.

(1) Suppose a project folder such as “L:\Henry Lawson\Short Stories in Prose and Verse” populated with seventeen chapters identified by number “SSPOV_01.wav”, “SSPOV_02.wav”, “SSPOV_03.wav” representing individually recorded chapters and another series “SSPOV_01_Preface.wav” etc and “SSPOV_01_Suffix.wav” which were recorded in a single session with a slightly different tone from the text of the chapters.

(2) Suppose a DOS batch file which can process each triplet of files (“SSPOV_01_Preface.wav”, “SSPOV_01.wav”, “SSPOV_01_Suffix.wav” and offer them up to Audacity 3.1.3

(3) Suppose a single Audacity macro which can assemble three prepared WAV files to a single WAV file; pre/appends silences, and then export as an MP3 file.
Then we can assemble the component files of a complete book in about five minutes, almost all of it automatic, and hence error-free, and it is usually elimination of errors in processing that saves us the most time.


Cheers
Chris
I adopt YOUR orphaned chapters, for FREE!
TriciaG
LibriVox Admin Team
Posts: 60719
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

But we don't assemble all chapters of a book into one MP3. :hmm:

Or are you referring to shorter chunks of one section of a project? I think you spoke earlier of recording a section in separate chunks, all separate WAV files that you assembled later. I suppose a batch process to assemble all those would be useful in that case.
School fiction: David Blaize
Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
Humor: My Lady Nicotine
ChrisGreaves
Posts: 640
Joined: December 31st, 2021, 4:07 pm
Location: ///paused.undefined.exposed

Post by ChrisGreaves »

TriciaG wrote: February 1st, 2022, 2:56 pmI think you spoke earlier of recording a section in separate chunks, all separate WAV files that you assembled later. I suppose a batch process to assemble all those would be useful in that case.
Tricia, you have an excellent memory!

For my assigned sections in J.S. Bach, Volume 2 by Albert Schweitzer I recorded each page as a WAV file. Sections in Bach were typically 4,500 words spread across 20 pages with a page containing chunks of musical score, German and Italian phrases, and footnotes in English, German and Italian, some as big as ¾ of a page, others spanning two pages. A baptism by fire. This called out for "modular recording".

My first solo project, Short Stories in Prose and Verse, by Henry Lawson, boasts a preface and sixteen chapters, so seventeen sections, and here I decided to make each chapter a single file.

So I am in the business of assembling sets of WAV files into a single MP3 file. In particular for Lawson, each chapter needs the audio for introductory text and the trailing text (“End of Chapter thirteen”). That suggests three WAV files for each of seventeen sections.

I have in mind to do another ninety-four Lawson projects (books), and with macros that should take just under two years, so it is worthwhile to set up an automated system now, and reap the time-saving benefits over the next two years. Further, if other members of LibriVox want to make use of the code, then the time-savings will be multiplied.

Tonight I am documenting the little system. Tomorrow it will have its first full-scale run and I will be timing it, to get a benchmark figure for assembly.

Cheers, Chris
I adopt YOUR orphaned chapters, for FREE!
TriciaG
LibriVox Admin Team
Posts: 60719
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

There may be some who benefit from such a macro. Personally, I don't record in chunks. I record the intro, body, and outro in one file (which I save to FLAC rather than WAV - both lossless, but FLACs are smaller files), 99.9% of the time in one recording session. :)

A macro I would love, if possible, would be to do this:
- Select all
- Run Limiter set at -4 (the rest of the settings at default)
- Select about 4 seconds of the end of the recording
- Get Noise Profile
- Select all
- Run Noise Reduction at my settings

I used to have a worse routine when I used Compressor (since it seems to add a fade-in effect at the start, I used to generate 1 second of tone at the very start, then run compressor, then delete the generated tone). But since I switched to Limiter, my process has gotten a bit more efficient.

I suppose if I were to get more automated, before the above steps, one could add a "export to FLAC" command, and at the end after the noise reduction, an "export to MP3" command. That would fully automate all my steps after manual editing. :hmm:
School fiction: David Blaize
Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
Humor: My Lady Nicotine
annise
LibriVox Admin Team
Posts: 38635
Joined: April 3rd, 2008, 3:55 am
Location: Melbourne,Australia

Post by annise »

Chris - It would be a good idea before you spent all this effort to actually produce a file that can be checked - either your claim or first section of your solo.
Designing a system without full knowledge of the way it works is not good practice.
We have a way set out for people to read books that can be catalogued, and it works but how the readers decide they want to get there is up to them.
But it isn't necessary to make it so complicated.

Anne
InTheDesert
Posts: 7658
Joined: August 20th, 2019, 8:25 pm

Post by InTheDesert »

TriciaG wrote: February 1st, 2022, 5:46 pm There may be some who benefit from such a macro. Personally, I don't record in chunks. I record the intro, body, and outro in one file (which I save to FLAC rather than WAV - both lossless, but FLACs are smaller files), 99.9% of the time in one recording session. :)

A macro I would love, if possible, would be to do this:
- Select all
- Run Limiter set at -4 (the rest of the settings at default)
- Select about 4 seconds of the end of the recording
- Get Noise Profile
- Select all
- Run Noise Reduction at my settings

I used to have a worse routine when I used Compressor (since it seems to add a fade-in effect at the start, I used to generate 1 second of tone at the very start, then run compressor, then delete the generated tone). But since I switched to Limiter, my process has gotten a bit more efficient.

I suppose if I were to get more automated, before the above steps, one could add a "export to FLAC" command, and at the end after the noise reduction, an "export to MP3" command. That would fully automate all my steps after manual editing. :hmm:
That would be quite doable except that noise reduction is tricky because it's a two step effect and the macro can't select the noise profile (though it can do reduction).
Female Scripture Characters by William Jay (1769 - 1853) 97% 1 left! "The Penitent Sinner Part 2"
St. Augustine (Vol.6 Psalms 126-150) 96% 2 left!
PL pls: DPL DPL 21 43 27-28
mightyfelix
LibriVox Admin Team
Posts: 11128
Joined: August 7th, 2016, 6:39 pm

Post by mightyfelix »

ChrisGreaves wrote: February 1st, 2022, 5:25 pm [In particular for Lawson, each chapter needs the audio for introductory text and the trailing text (“End of Chapter thirteen”). That suggests three WAV files for each of seventeen sections.
In what way is this a time saver? It takes approximately one second for me to just say the words "End of chapter 13" before I stop recording. Seems to me like you're adding work, not taking it away, by recording this separately and then tacking it on afterwards.

I could see how it might make sense if the beginning and ending really was the exact same for every file. Then you can record it once and tack it on to every chapter. But it's not the same, ever. The beginning and ending will always have a unique chapter and/or section number and/or title.
Post Reply