Using Long Audio API from Azure Cognitive Services in .NET C#

Jay (Vijayasimha BR)
ProjectWT
Published in
2 min readJan 30, 2022
Photo by Vijayasimha BR on Unsplash

For years now, I have been wondering if I could narrate and publish audio books versions of the Sherlock Holmes stories. No specific reason. Just wanted to do it. Just for kicks. For fun.

I kept telling myself that, one day, I would hire a few voice artists and ask them to read the entire collection of the super sleuth. Of course, that has not happened so far.

Then, recently, a client engaged with me to help him understand some C # code, his previous developer for hire, has delivered. My job was strictly tutoring. Whilst I was helping him, I once again ended up on the documentation page for Azure Cognitive Services.

Over the years, I have been bumping into Azure’s Cognitive Services offerings. I would spend some time browsing the docs, but I could never find anything useful to do with it. I did try to build a chat app, but that was prohibitively expensive.

Then, I realized that, lately, I have become fairly regular with my podcast.

Then, a lot of ideas started coming together.

What if I could build a new podcast channel (I already have one podcast channel where I talk about my daily, dull, life), and start publishing audio books, with Sherlock Holmes stories, where the voice was that of an AI?

Ah! So, I decided to spend some hours and days, getting a demo code up and running. I finally got it working.

You can find the repository here, on my github account.

The demo can be used for simple use cases. Like, taking a txt file that contains an entire Sherlock Holmes short story and turn that into an audio file. It works. I have tested it.

Final Note

My plan next, is to use this simple class library that I have built, to start taking stories from Project Gutenberg, and start publishing the generated audio as podcast episodes.

I also plan to invest more time with Speech Service offered by Azure and see what else we can do with it.

Improve the above linked demo code, as my own knowledge progresses and advances

I work as a full time freelance coding tutor. Hire me at UpWork or Fiverr or Stack Overflow. My personal website is here. Find more of my art at Behance and Unsplash. Also, I have a Podcast. Also, I am on substack.

--

--