DEV Community

Free Python Code
Free Python Code

Posted on

How to make (human-like voice) Using Python

Hi 🙂🖐

In this post, I will share with you How to make (human-like voice) Using Python.

Step 1

Create account in elevenlabs from here

Step 2

Install

pip install elevenlabs

Step 3

Get list of voices

import elevenlabs

elevenlabs.set_api_key('Your API key')



# get list of voices
for voice in elevenlabs.voices():
    print(voice.name)
Enter fullscreen mode Exit fullscreen mode

you can add new voices to your Voice Library from : https://elevenlabs.io/app/voice-library

Setp 4

Generate human-like voice


import elevenlabs

elevenlabs.set_api_key('Your API key')


text = 'This text for test 123'

audio = elevenlabs.generate(
    text = text,
    voice = 'Jarvis'
)

elevenlabs.play(audio = audio)

Enter fullscreen mode Exit fullscreen mode

Top comments (0)