And this is a success story.
“Hey, let’s try recording their answers.”
And so begins the customary death-by-a-thousand-cuts, house-to-house fighting, two steps forward three steps back, nail-pulling war of attrition you RMS-worshipping, oh-golly-its-free-as-in-beer millennials have created, which is why the sane gender no longer works in IT.
Let us capture one of these slow-motion train wrecks live. I am recording this as I go, to make it real. I have started this before but never finished, crushed by the enormity of the ensuing saga. Suspect this will go the same.
We start with a great prospect of a link, from a site I just discovered ten minutes ago: Google developers talk audio recording! BAM!
Speed Bump #1
Oh. Just code snippets. Fine ones, I am sure, but no working, complete examples. Sigh. Look, I am in “cheat” mode here.
Throw me a frickin’ working example, people!
To make things worse, while scrolling about looking for a working example, old eagle-eye spots something ominous.
Speed Bump #2
Once the user has granted access, they won’t be asked again, however, if they reject access, you can’t ask the user for permission again.
Awesome. A user preference death sentence.
“Hi, is this tech support?”
“Yes, Hi, this is support! You rejected microphone access the first time and now you cannot record your answers.”
“How did you know why I was calling?”
So we google “how undo rejected microphone access on mac”. We will worry about Bill Gates’s ticket to Hell some other time.
Not bad. We get a link from Apple Themselves. Its a System Preference!
Speed Bump #3
Try finding a system preference by name here, a control panel designed by people who think visual icon scanning is even possible, who also think Mac users are too cool for alphabetical order. It took me ten seconds to find “Security & Privacy”. Now talk Gramps through finding it over chat support.
We were doing so well in 1984 when we had title bar menus, then Steve Jobs put the artists in charge of U/X. Do not get me started.
I found the cuckoo clock icon that just screams “security”. click
“OK, sir. Now do you see the little lock way in the bottom left corner? Sir? Are you still there?”
Better double the number of support lines. Anyway, fine, I guess we cannot have apps randomly recording my planning sessions with Q. We budget another 5o% for support and get on with our lives, namely, the search for a working example.
Speed Bump #4
Sorry, I know it has been three hours, but none of the complete working examples I have found, you know, work…wait!
This one records! And downloads automagically!
Speed Bump #5
Fine. Be that way.
OK, this next link looks good…wait…
Speed Bump #6
This is the 4th post in our new recording audio in HTML5 series.
Four posts? Reminds me of the 14 videos for “Introduction to Redux”.
How about this beauty? Ugh, more great documentation but no working example. Hang on, we have footnotes. And be still my beating heart….a CodePen example! click
Booya! It records, plays back, and downloads! A what? An OGG file?
Speed Bump #7
OGG. A format neither QuickTime nor Audacity understand. It creates a format Audacity does not support?!
“Momma, don’t let your babies grow up to be programmers…”
Actually, Audacity says, “Try installing FFmpeg.” “Try”? Love the honesty.
brew info FFmpeg
Eureka! Sounds like a little 2K glue library.
brew install ffmpeg
Sorry, I have been gone for a while. Made popcorn halfway thru this…
==> Installing dependencies for ffmpeg: aom, dav1d, libpng, freetype, fontconfig, frei0r, lame, fribidi, glib, libpthread-stubs, xorgproto, libxau, libxdmcp, libxcb, libx11, libxext, libxrender, lzo, pixman, cairo, gobject-introspection, graphite2, icu4c, harfbuzz, libass, libbluray, libsoxr, libvidstab, libogg, libvorbis, libvpx, opencore-amr, jpeg, libtiff, little-cms2, openjpeg, opus, rav1e, flac, libsndfile, libsamplerate, rubberband, sdl2, snappy, speex, srt, giflib, webp, leptonica, tesseract, theora, x264, x265, xvid, libsodium, zeromq and zimg
Yay, complete. Relaunch Audacity and try again on the OGG file.
Terminator Speed Bump #7 Is Back
Audacity says, “Try installing FFmpeg.”
The astute reader may be concerned that I am tilting at windmills purely for the masochistic thrill, given that our app does not need to deal with OGG files, but I do want confidence that the working example I found handles audio well. And I can be a stubborn ass.
Googles “Audacity Mac cannot open ogg. file”
Oh, lookie, a link from the Audacity forum itself! This will be awesome!! click
Speed Bump #8
The name of the file suggests that it is actually “opus” rather than “ogg”. Audacity does not currently support “opus”. — steve
So no help here. The dumbass was trying to open an Opus file, whatever that is, that was merely named OGG. Dude.
But two replies down and six hours later, “steve” was back.
There’s also an on-line tool here that can give you information about the format of audio files: https://mediaarea.net/MediaInfoOnline
If that says that the file is “opus” encoded, then you will need to use something other than Audacity to convert it into another format.
Cool, I bet MediaInfoOnline will say our OGG file is corrupt.
Format : Opus
Our wonderful tool created an Opus format OGG file.
Courage, troops. “steve” is a full-service guru:
There is a command line decoder for opus here: https://opus-codec.org/downloads/
“Sancho! My armor!”
Speed Bump #9
A command-line app? Courage, schmourage. I am recovering from my second Pfizer, kinda hoping for drag and drop I can use in my sleep.
googles “mac convert opus audio files”
NCH! Back to Shakespeare!
Once more unto the breach, dear friends, once more; Or close the wall up with our Developer dead!
Download…DMG!…install…open…dragdrop…save as MP3…
It works. I can hear the audio I recorded earlier today.
I need a nap.