DEV Community

Cover image for Unveiling the Magic: Creating AI-Based Audio with Voice Conversion
Sanju Jayachandran
Sanju Jayachandran

Posted on

Unveiling the Magic: Creating AI-Based Audio with Voice Conversion

Have you seen a video where a famous person sings in a language they might not know? Sometimes, that's not really them singing! Thanks to AI what was once impossible is now possible.

I saw a video like that on Instagram with Shah Rukh Khan. He was singing in Malayalam, but it wasn't really him – it was AI making his voice sound like that. This got me really curious about the inner working of this AI Technology.

AI is getting better every day, and one cool thing it can do is change how voices sound. We something called Retrieval-based Voice Conversion (RVC) to make this happen.

There are two main ways to do this:

  1. On Your Computer: If your computer is pretty good with graphics, you can do it there.
  2. Using Google Collab: This is an online place where you can use a powerful computer from Google.

I'm making a step-by-step guide on how to change normal voices into cool AI-created sounds using Google Colab.

Refer this Colab notebook - https://colab.research.google.com/drive/1Gj6UTf2gicndUW_tVheVhTXIIYpFTYc7#scrollTo=Y13Eh9r_g8f-

Steps to Convert Audio Using Google Colab:

  1. Install Required Package:
    • Start by installing the required package. It typically takes 30 to 45 seconds to complete.(Refer step 1 in notebook)
  2. Choose a Pretrained Model:
    • There are various pretrained models available online, listed here based on popularity.
  3. Get the Model Link:
    • After package installation, provide a random model link or select the model of the person whose voice you want to convert(Refer step 2 in notebook).
  4. Generate Public URL:
    • Execute the next cell to open the GUI. This action creates a public URL that looks similar to the provided image.

Image description

  1. Access the GUI:
    • Click on the live public URL to access a new GUI. Image description
    • Navigate to the "Download model" tab
    • Select a link from the provided Drive link
    • Paste it into the "Enter the URL to model" field.
    • Give your model a desired name
    • Click "Download."
  2. Test the Model:
    • After successful download, head to the "Inference" tab.
    • Refresh the listed models to update the model list.
    • Select the model name you provided earlier.
    • Upload the audio file you want to convert and click "Convert." It only takes a few seconds for the conversion process.
  3. Download the Converted Audio:
    • Once the conversion is done, the audio will be generated.
    • Click on the three dots to access the download option. (Note: In some browsers, the three dots might not appear.(Try to Google Chrome))

As Elon Musk mentioned AI is far more dangerous than nukes. 😛

Be responsible when using AI.

Thanks for reading !!!!

Stay tuned for the Next Post where we will be training Custom Models.

Top comments (1)

Collapse
 
harinarayanan profile image
Harinarayanan

Impressive