Watch Taking a Sledgehammer to Bottlenecks 🎥 as Ruth & Steph show how AI actually fixes margins.
How to use Azure Cognitive Services to make voiceovers for your videos

How to use Azure Cognitive Services to make voiceovers for your videos

In this post, we take you through how to use Microsoft's Cognitive Services to generate voiceovers for your videos. In practice, this technique for generating speech from text can be used in a wide range tasks but one of the ways we're using it at Nightingale HQ is to support our marketing team.

If you are unfamiliar with some of the words we've used, here's some background reading:

If you don't yet have an Azure account, you can get one for free and start using this technology free forever. It also offers you free access to different technology, including an API that uses reinforcement learning to optimise your content displays to customers, but more on that another day.

The process you will work through is:

  1. Create a private, authenticated Speech AI service that can be used for a variety of purposes including Text to Speech
  2. Create an account to run data science and AI code for free using Azure Notebooks
  3. Make a personal copy of our notebook
  4. Add your details and desired text to your notebook
  5. Hit Run a bunch of times
  6. Download the generated file
  7. Load the file into whatever video editing tool you're using

If this is your first delve into using cloud computing and working with code, don't rush through the process and since all of it is free, don't be afraid to delete and start again. Once you've done all the setup, you'll be able to use your notebook web page again and again to produce quick, AI-generated audio files!

Set up Azure Cognitive Services

  1. From your Azure Portal, go to the Marketplace and search for 'Speech'.
  2. Find the Speech cognitive service and create the resource! Speech cognitive service in the Azure Marketplace
  3. Give your resource a name and select your subscription, location and resource group. Choose 'F0' for your pricing tier as this gives you free access to the resource, up to 5M characters per month. creating a resource for the Speech cognitive service
  4. Navigate to your new resource from your dashboard and copy the API key. Do not share this key publicly. Speech API key

Set up your Azure Notebook Project

  1. Follow this link to the Notebook Project and click 'Clone' to create your own copy. You may need to sign in to Azure again.
  2. In the dialogue, give your cloned project a name. Leave the 'Public' box unchecked as you do not want your API key to be publicly available.

Run the project

  1. Click on voiceover-generator.ipynb to open the Jupyter Notebook. Wait for it to fully load.
  2. You are now ready to generate audio from text! Follow the instructions in the README.md and voiceover-generator.ipynb files, or watch the video below to create an audio file from text of your choice. Note that in the video our API key is read from a text file, to keep it private.

Click below to hear the audio file that was created in this video:

About the Author

Mia Hatton
Mia Hatton - Data Scientist

Budding data scientist with an entrepreneurial and science communication background.

Cut the Scrap

Errors cost money. Scrap costs money. We help you stop making both. Use tools built for the shop floor, not the boardroom.

Related Posts

How to score your first AI quick wins: Intelligent Insights

There’s no doubt that going ahead with Artificial Intelligence (AI) can be risky. We’ve seen numerous AI fails from major companies including IBM, Amazon and Microsoft which landed them in hot water, something big companies can often bounce back from, but could be more of a problem for the smaller players. The trick to getting started with AI is to start small, which is where our quick win AI projects come into play.

Read More: How to score your first AI quick wins: Intelligent Insights

Industry IoT, smart factories and AI in manufacturing

The world of manufacturing is on the brink of another revolution due to the Internet of Things (IoT) and Artificial Intelligence (AI) applications. Aside from clear use cases like robotics and automation, big data applications are coming into play, thanks to industrial time series data collected by data historians. Thriving on all this data, AI systems can be built to send early warnings, optimise processes, predict maintenance and enforce quality control. By collecting the right data, manufacturers can get really creative with their AI solutions, and it can set them apart from the competition.

Read More: Industry IoT, smart factories and AI in manufacturing

How IoT technology can be used to improve UK public transport

There is no shortage of possible applications when it comes to Artificial Intelligence (AI) in the public sector, but while the UK government is investing heavily in AI in the private sector, what are they actually doing to implement it themselves? Some fear that governments using AI will result in a dystopian future of constant surveillance, but in reality, public sector applications of AI are far more pragmatic.

Read More: How IoT technology can be used to improve UK public transport