Tales from the jar side: Creating audio from text with Spring, New video tools, Help me earn a tenth of cent from my custom GPT, and the usual silly tweets, toots, and skeets
Sketch artist holds up a drawing of a single straw. Camel, in a wheelchair, sobs, "Yes, that's him!" (rimshot)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of January 1 - 7, 2024. This week I taught my classes Making New Java Features Work For You and Managing Your Manager on the O’Reilly Learning Platform.
Here are the regular info messages:
Regular readers of and listeners to, and video viewers of this newsletter are affectionately known as jarheads, and are far more intelligent, sophisticated, and attractive than the average newsletter reader or listener or viewer. If you wish to become a jarhead, please subscribe using this button:
As a reminder, when this message is truncated in email, click on the title to open it in a browser tab formatted properly for both the web and mobile.
Creating Audio from Text
The latest video on the companion Tales from the jar side YouTube channel is called How to create audio from text using Spring and OpenAI.
I asked Claude.ai to summarize it and got this back:
“Here are 5 key bullet points summarizing the video:
Demonstrates using Spring Boot and OpenAI's text-to-speech API to convert text into audio MP3 files
Maps the OpenAI API request/response format into a Java record class for easy access
Implements a Spring HTTP exchange interface to call the API with proper annotations
Saves the returned audio byte array into an MP3 file for playback
Shows how to add request validation and bundle it all into a fast-starting GraalVM native image executable”
That works for me, but since the whole point of the video was how to generate an mp3 file from text, here’s the audio version of that summary:
I like that particular voice, which is called Fable in the OpenAI documentation. The mild British accent makes it sound authoritative, at least to American ears. (I expect any British jarheads are laughing at me for that, but they’re welcome to do so, as long as it’s in an authentic British accent. :)
The code is in this GitHub repository, which now includes demos of using the chat capabilities, generating images, transcribing audio to text, and now generating audio from text, all using Spring. I definitely intend to use this during my Spring AI class this week, even though none of this uses Spring AI. I tend to refer to this as my Spring with AI without Spring AI project, and it turns out that it has a lot more capabilities than the actual Spring AI project at the moment.
New Video Tools
Though viewers probably don’t care, this video is also significant for another reason: for the first time, I used a different set of tools to record and edit it. Normally my videos are made using Screenflow, which is great for recording your screen, but I’ve been running up against its limitations for a while and I’m not sure the parent company is much interested in maintaining or improving the software any more.
That led me to Tella, and to DaVinci Resolve. Tella is a simple screen recorder that allows you to record multiple segments and change the layout in each. It also has the ability to add zooms in it, which I use a lot. It’s much more of a recorder than a full video editor, however. It’s fine for simple videos, but doesn’t have many capabilities.
That’s where DaVinci Resolve comes in. Resolve is a full-featured editor that can do practically anything, even in the free version. To use it, however, you need to add your own recordings to it (as well as images, audio files, etc). In Screenflow, all I have is a single mp4 file that is generated when I do an export. In Tella, I can export all the individual segments and upload them into Resolve and go from there.
If this sounds complicated, it kind of is, but I’m concerned about Screenflow. In addition to bumping up against its limits, I’m also worried that the parent company (Telestream) doesn’t really care about it. They haven’t released a new version in a long time, and their support files are very dated. They also don’t seem to be active in their support forums. I’m concerned about their support coming to an end, and I needed an alternative.
It should be obvious in the new video that I’m using the new tools, because it easily switches from a full screen mode to a screen recording view and back again, and I’ve added some text effects as well. This was my first attempt, so I have a lot to learn, but I think it came out pretty well.
Finally, if you happen to be interested in Tella, here’s my affiliate link which will get you a significant discount if you ever decide to upgrade to the Pro version.
Help Me Earn $0.001
OpenAI announced the opening of their GPT Store this week. If you explore the GPTs available in the store, you’ll find one called Mockito Mentor. That’s a GPT that I trained based on my book Mockito Made Clear, along with several blog posts I wrote about it on Medium. If you use it, you can not only ask it about Mockito, but also the GitHub repository holding the book’s source code and a discount code for the book. Sweet!
OpenAI claims that custom GPTs can earn money:
I’m not expecting to earn much, because:
They haven’t even defined how you will earn anything yet,
Mockito Mentor is a pretty specialized GPT, appealing to a very small market,
I’ve heard estimates that suggest there are over 3 million custom GPTs in the store already.
My goal, therefore, is to earn the astronomical sum of 1 tenth of a cent from the massive usage that will inevitably come from jarheads reading this newsletter. (That’s assuming, of course, that anyone uses it at all.) But hey, stranger things have happened, though not often, and not to me.
I was going to promise not to spend the proceeds all in one place, but given that the proceeds will likely be much less than a penny, I don’t think I can promise that. I can’t even promise to give it to charity, because I doubt there are many charities that would see a penny (I’ll be sure to round up) as anything other than an insult.
It’s also not clear to me that I’ll even know if anybody uses my GPT. They didn’t say anything about notifying the creator, though I know they at least have my contact info. Of course, so do you, which can be as simple as adding a comment to this newsletter. So feel free to let me know if you search for Mockito Mentor and maybe even ask it a question or two. Feel free to lie to me about it. That ha-penny isn’t going to earn itself.
If you’re interested in the process of creating a GPT, please check out this video:
I’m planning to do a future presentation based on the contents of this video, which I’ll call Creating Custom GPTs for Fun, Profit, and Potential Liability. That ought to be fun.
Tweets, Toots, Skeets, Etc.
For those who aspire to be Indiana Jones:
I have no idea where that came from, and sorry about the grammar/punctuation/spelling issues, but it’s still awesome.
But I thought Europe had lots of EVs
Not as many as you might have thought.
Seems reasonable
Would be awfully quiet otherwise.
Dave Wiskus is the CEO of Nebula, the creator-owned video subscription service that I love (I’m a lifetime subscriber). He also posted this:
I think peepops should be the definitive term for HR from now on.
That’s a real time-saver
YES, PLEAZ DOO SO
Happy New Year
Also remember to celebrate Checkuary — that period of the new year when you accidentally write the old year on your checks.
(For you young-ins, checks were pieces of paper we wrote on and signed and put in the mail to pay bills. Banks embedded your account information right on them, and hey, what could go wrong with that?)
Speaking of age checks:
IYKYK
Me: Whoa! I remember autoexec.bat files. Had a PC-XT with a 20 MB hard drive where I used to edit them.
You: Right, grandpa. Now let’s get you back to bed.
Poor Harold
I could totally see that happening.
I always wanted one of those
Here’s a direct link to that article. People are speculating that the descriptions are being generated by AI with no proofreading, but I suspect they’re generated by non-English speakers who then just copy and paste them. Maybe both.
There are several more examples in the article, if you want to lament the state of Amazon product listings.
I’ve got a fever…
SNL, Blue Oyster Cult, the immortal Christopher Walken. It’s the More Cowbell sketch:
I guess I have to say something about Boeing
Sigh. Have a great week everybody!
The video version of this newsletter will be on the Tales from the jar side YouTube channel tomorrow.
Last week:
Reactive Spring and Spring Boot (APAC time zones), on the O’Reilly Learning Platform
Managing Your Manager, ditto
This week:
Spring AI, on the O’Reilly Learning Platform
Latest Java Features, an NFJS Virtual Workshop
If Checkuary is that period of the new year when you accidentally write the old year on your checks, what is the period each week when you forget to change the week at the beginning of your newsletter?