PuppyCoding – for Python & AI
PuppyCoding – for Python & AI
  • 30
  • 80 797
How to use custom voices in the ElevenLabs API: A Python tutorial
A beginner-friendly tutorial showing how to use custom voices with the the ElevenLabs API, including how to find the voice ID for your custom voices.
Get the source code here:
puppycoding.com/2023/10/09/elevenlabs-api-custom-voices/
See a video about how to use the ElevenLabs API here:
ua-cam.com/video/1t9FhxQcDiw/v-deo.html
And see a video of all the premade ElevenLabs voice samples here:
ua-cam.com/video/pXArMwOgjPU/v-deo.html
You can create a custom voice from the ElevenLabs "Voice Lab" page:
elevenlabs.io/voice-lab (you'll need an account)
00:00 Intro
01:06 Getting voice IDs from the ElevenLabs docs page
03:27 Using the voice ID to generate audio
04:08 Getting voice IDs with Python code
#Python #programming #ElevenLabs
Переглядів: 7 602

Відео

Generate images with OpenAI DALL-E & Python
Переглядів 2,3 тис.Рік тому
A beginner-friendly tutorial showing how to generate images with Python using the OpenAI API (DALL-E). Use this to build a Python AI image generator. Get the source code here: puppycoding.com/2023/09/05/generate-images-openai-dalle-python/ 00:00 Intro 00:28 Set your OpenAI API key 01:33 Create the image request 03:30 Print the response and image URLs 05:03 Create variations of an image 06:51 Op...
How to use Python "get" - fix key errors, e.g. from GPT response
Переглядів 274Рік тому
Level up your Python programming with the 'get()' function, and avoid missing key errors, e.g. with GPT function calling. Get the sample code here: puppycoding.com/2023/08/29/python-get-function/ #Python #programming
Unofficial Guide to OpenAI API Keys - Your Questions Answered
Переглядів 646Рік тому
I've seen some confusion about OpenAI API keys, such as how to get an OpenAI API key and any restrictions, so this FAQ video tries to answer the questions developers may have. You can see a text version of the questions and answers, with source links, here: puppycoding.com/2023/08/25/openai-api-key-guide/ 00:00 Introduction 00:17 How can I get an OpenAI API key? 00:40 Do I need an API key to us...
How to use the ElevenLabs API: Python text-to-speech tutorial with examples
Переглядів 33 тис.Рік тому
A beginner-friendly tutorial showing how to generate voice output with Python using the ElevenLabs API for TTS (text-to-speech). No account or API key is needed for the initial trial so you can run the code in this video for free. Get the source code here: puppycoding.com/2023/08/24/elevenlabs-api-python-tutorial/ And see a video of all the premade ElevenLabs voice samples here: ua-cam.com/vide...
ElevenLabs Voice Samples: Hear all premade AI voices
Переглядів 10 тис.Рік тому
These are samples of all the built-in (premade) AI voices available at ElevenLabs, as of August 2023. Below is the voice ID for each of the voices: Adam: pNInz6obpgDQGcFmaJgB Antoni: ErXwobaYiN019PkySvjV Arnold: VR6AewLTigWG4xSOukaG Bella: EXAVITQu4vr4xnSDxMaL Callum: N2lVS1w4EtoT3dr4eOWO Charlie: IKne3meq5aSn9XLyUdCD Charlotte: XB0fDUnXU5powFXDhCwa Clyde: 2EiwWnXFnvU5JabPnv8n Daniel: onwK4e9ZL...
If you write code, do this.
Переглядів 3,2 тис.Рік тому
I've just learned the hard way what happens if you love coding but neglect your health. If you're a programmer, here are some tips to take care of your back and prevent pain. There's also an interesting discussion of this on Hacker News, with more tips and suggestions from commenters: news.ycombinator.com/item?id=36826755 00:00 Intro 00:13 Slipped disc 00:46 Pain relief 01:19 Daily stretches 02...
How to Print ChatGPT API Response Output as a Stream: An Example in Python
Переглядів 3,3 тис.Рік тому
How to print the response output from ChatGPT API as a stream. Note this is a developer tutorial and assumes you already know how to use the ChatGPT API (although I try to explain everything!). Get the source code here: puppycoding.com/2023/07/08/stream-chatgpt-response/ 00:00 Intro 00:18 Step 1: Add stream parameter to ChatGPT request 00:38 Step 2: Print in chunks 03:29 Step 3: Remove extra li...
How to Hide API Keys When Deploying Code: Use Environment Variables on a Remote Server
Переглядів 1,1 тис.Рік тому
When deploying code to a server, it's best *not* to use a ".env" file to hide your API keys. Instead, here are two methods for storing environment variables - directly in the server's terminal or using the hosting platform's variable storage feature. Whichever method you use, you can then easily access your environment variables with Python using the built-in "os" module's "getenv" function. Ge...
Simplest Way To Use ChatGPT API With Python: Explained By Example
Переглядів 2,7 тис.Рік тому
How to create the most basic Python program to interact with the ChatGPT API. This is a simple tutorial for beginner and intermediate developers, and should be easy to follow if you have a little knowledge of Python. Get the source code here: puppycoding.com/2023/07/04/simplest-chatgpt-python/ The video I mention about hiding your API keys is here: ua-cam.com/video/FrQ46MPSpUs/v-deo.html 00:00 ...
How to Hide API Keys in Python: An Environment Variables Example
Переглядів 3,2 тис.Рік тому
If you use OpenAI's ChatGPT API, or most other APIs, here's how to keep your keys secret and safe in Python. This tutorial shows you how to use "environment variables" and the "dotenv" module. The concept is to move the API keys from your Python code to your Python environment. Your programs can still access the keys, but they won't be visible to others if you share your code. Get the source co...
ChatGPT API Function Calling with Python: JSON Output Example
Переглядів 11 тис.Рік тому
How to use the ChatGPT Function Calling feature in Python, so you can get a JSON object as the output from the API response in your programs. Note this is a developer tutorial and assumes you already know how to use the ChatGPT API. Get the source code here: puppycoding.com/2023/07/07/json-object-from-chatgpt-api/ 00:00 Introduction 00:44 Handling the OpenAI API key 02:21 Preparing the input 03...
#Fathom Analytics: Growth Strategies With Event Filtering
Переглядів 49Рік тому
An unofficial tutorial showing how I use event filters in Fathom Analytics to develop marketing and website strategies. This walkthrough demonstrates how to find out more about a subset of your audience (anonymously of course), based on their interactions with your site. * [Video] How to measure engagement with events: ua-cam.com/video/uB7nMm9GnFw/v-deo.html * Official documentation for events:...
#Fathom Analytics: Measuring Engagement With Events
Переглядів 412 роки тому
An unofficial tutorial showing how to measure engagement (user interactions) on your website using Fathom Analytics events. This walkthrough demonstrates how to count actions such as clicks on external links. Official documentation for events: usefathom.com/docs/features/events If you want Fathom Analytics on your website, get $10 off with this link: usefathom.com/ref/HNLCYW 00:00 Intro 01:16 C...
#Fathom Analytics: Developing Strategies
Переглядів 152 роки тому
How I use Fathom Analytics to develop strategies for my website, by defining goals and measuring progress towards those goals. If you want Fathom Analytics on your website, get $10 off with this link: usefathom.com/ref/HNLCYW 00:00 Intro 00:21 Defining Goals 06:04 Measuring Progress Audio jingle by Sub-d: freesound.org/people/Sub-d/sounds/47464/
#Fathom Analytics: Dashboard Demo
Переглядів 952 роки тому
#Fathom Analytics: Dashboard Demo
♪ Cloud Space - Daniemon & Holly
Переглядів 1843 роки тому
♪ Cloud Space - Daniemon & Holly
♪ Don't Know Much About Privacy - Daniemon & Holly
Переглядів 1514 роки тому
♪ Don't Know Much About Privacy - Daniemon & Holly
♪ Please Don't Feel Lonely - Daniemon (Original Song)
Переглядів 534 роки тому
♪ Please Don't Feel Lonely - Daniemon (Original Song)
♪ The Colours of You - Daniemon (Original Song)
Переглядів 705 років тому
♪ The Colours of You - Daniemon (Original Song)
♪ One in Six Million - Daniemon (original song)
Переглядів 525 років тому
♪ One in Six Million - Daniemon (original song)
♪ L-O-V-E - Daniemon (live performance)
Переглядів 615 років тому
♪ L-O-V-E - Daniemon (live performance)
♪ The Circle Song - Daniemon (original song)
Переглядів 4775 років тому
♪ The Circle Song - Daniemon (original song)
♪ The Moon Is The Same - Daniemon (original song)
Переглядів 705 років тому
♪ The Moon Is The Same - Daniemon (original song)
♪ Business Class - Daniemon (original song)
Переглядів 635 років тому
♪ Business Class - Daniemon (original song)
♪ Eyes Under the Christmas Tree - Daniemon (original song)
Переглядів 2095 років тому
♪ Eyes Under the Christmas Tree - Daniemon (original song)
♪ Give it a go - Daniemon (original song)
Переглядів 786 років тому
♪ Give it a go - Daniemon (original song)
♪ Oh! Selector - Daniemon
Переглядів 2649 років тому
♪ Oh! Selector - Daniemon
♪ Please Retweet This Song - Daniemon (original song)
Переглядів 30610 років тому
♪ Please Retweet This Song - Daniemon (original song)
♪ Step Away From The Screen - Daniemon (original song)
Переглядів 44510 років тому
♪ Step Away From The Screen - Daniemon (original song)

КОМЕНТАРІ

  • @pingpongcommunications4757
    @pingpongcommunications4757 14 днів тому

    The video is easy to understand. Could you please explain to me what is better about this version than working with the very clear Eleven Labs user interface. This is not meant as a criticism, I would be honestly interested in what advantages it offers to control Elevenlabs via Python. Thank you very much!

  • @adityapatil6723
    @adityapatil6723 16 днів тому

    can we use a costom voice?

  • @MartinKoss
    @MartinKoss Місяць тому

    Brilliant explanation. Thank you.

  • @kaoulkae
    @kaoulkae 2 місяці тому

    I loved your coding video, I now love the song 🙂

  • @AKssupersan
    @AKssupersan 3 місяці тому

    Hi, I thought your video was great and your explanation is great! I don't understand why when I play the audio through Python it runs correctly but when I save the file the voiceover ends before, I'm using the endpoint with voice_id ending. Do you know what might be happening?

  • @biggestgamelibrary4025
    @biggestgamelibrary4025 3 місяці тому

    Excellent what I was looking for

  • @RichardStevens-l1s
    @RichardStevens-l1s 3 місяці тому

    As soon as any UA-cam, IG or tiktok videos uses one of these overused AI voices I skip the video.

  • @karol1158
    @karol1158 4 місяці тому

    To all having problem with error module 'elevenlabs' has no attribute 'generate'. I also encountered this problem and found a solution. But first, the source of the problem: authors update packages and some features change. How does it work now? You must first create a client based on your API key. To do this, you make a free account and generate a free string, so they can see from whom to download tokens for requests. Then in code: client = ElevenLabs( api_key="YOUR_API_KEY", # Defaults to ELEVEN_API_KEY ) and then using that client audio = client.generate( text="Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! வணக்கம்!", voice="Rachel", model="eleven_multilingual_v2" ) play(audio) Than you struggle with ffmpeg library like me now :) Good luck

    • @areukiddinme8438
      @areukiddinme8438 4 місяці тому

      bro at least show the full code, anyone can copy paste the following and run it after you have a key from eleven labs: from elevenlabs import play from elevenlabs.client import ElevenLabs client = ElevenLabs( api_key="Put_your_api_key_here", # Defaults to ELEVEN_API_KEY ) audio = client.generate( text="Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! வணக்கம்!", voice="Rachel", model="eleven_multilingual_v2" ) play(audio)

  • @MuySup
    @MuySup 5 місяців тому

    I'm 999 subscriber

  • @pumpmeamadeus7220
    @pumpmeamadeus7220 5 місяців тому

    Charlie voice is the s3xiest, specially in Brazilian Portuguese

  • @redsliders1
    @redsliders1 5 місяців тому

    thank you ...

  • @FromTheWombTotheGrave
    @FromTheWombTotheGrave 5 місяців тому

    mine says 'elevenlabs not defined'

  • @FushigiMigi
    @FushigiMigi 5 місяців тому

    love you bro

  • @Groep8Bbbbbbbbb
    @Groep8Bbbbbbbbb 5 місяців тому

    Whats the name of that creepy old man voice

  • @danieldenizakinci
    @danieldenizakinci 5 місяців тому

    what... is the image creation for MONEY?!?!?!?

  • @dianebrown5914
    @dianebrown5914 5 місяців тому

    This is the video I've been looking for. Every time you sample a voice you use your characters up. So THANK YOU VERY MUCH!!! 🎉👏

  • @Citruss_XIII
    @Citruss_XIII 5 місяців тому

    Thanks

  • @HackersAcademyHQ
    @HackersAcademyHQ 6 місяців тому

    Im getting a problem where elevenlabs has no attribute 'generate'. Could this be the wrong python version?

    • @bitsnstuff
      @bitsnstuff 5 місяців тому

      I get the same thing :(

  • @insan2080
    @insan2080 6 місяців тому

    Really appreciate the explanation! very simple and useful. Thanks!

  • @Vrilogs
    @Vrilogs 7 місяців тому

    Perfect and simple explaination on how to use streaming in ChatCompletion API! Thank you

  • @abelelizardo1452
    @abelelizardo1452 7 місяців тому

    I can't find the argument for generation is there a new update?

  • @anpro7147
    @anpro7147 7 місяців тому

    Im Antoni it’s my name Fr 💀

  • @MS-sv1tr
    @MS-sv1tr 8 місяців тому

    Do you know a way to stream output to a tkinter textbox? I've got streaming working in the terminal, but for some reason it won't stream output to a tkinter widget, it still waits until the entire response is completed and inserts the whole thing.

  • @luiscatalan3309
    @luiscatalan3309 8 місяців тому

    Thank you for a clear explanation!

  • @saurabhjain507
    @saurabhjain507 8 місяців тому

    Can you please create a video on how can we use fastapi streamingresponse ?

  • @minhajulabedin8612
    @minhajulabedin8612 8 місяців тому

    PS F:\python> & "C:/Users/Minhajul Abedin/AppData/Local/Programs/Python/Python312/python.exe" f:/python/generate_voice.py Traceback (most recent call last): File "f:\python\generate_voice.py", line 3, in <module> audio = elevenlabs.generate( ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'elevenlabs' has no attribute 'generate' PS F:\python>

    • @satyamjha_2
      @satyamjha_2 8 місяців тому

      did you find a solution yet?

    • @kamlesh6472
      @kamlesh6472 8 місяців тому

      ​@@satyamjha_2my too same problem

  • @Nick-kp7iw
    @Nick-kp7iw 8 місяців тому

    Great vid! Thanks! Do you have one in the works for instant clones or recommendation on approach?

    • @drewsisera
      @drewsisera 8 місяців тому

      I'm also curious to know if you can use an API for an instant cloned voice.

    • @ilizapink
      @ilizapink 6 місяців тому

      guys is this linux where can i code with python?!

  • @divinetamoutelight4209
    @divinetamoutelight4209 8 місяців тому

    This is actually very helpful thanks, i always had trouble finding all the voices

  • @user-if8dh6ix3l
    @user-if8dh6ix3l 9 місяців тому

    I tried to use it with a different language but it did not work, though I used model = "eleven_multilingual_v2". Any suggestions?

  • @user-if8dh6ix3l
    @user-if8dh6ix3l 9 місяців тому

    Great!!

  • @juncando
    @juncando 9 місяців тому

    The decrease in stability will bring in the wonkiness, for lack of a better word. It is better suited for your own voice samples where you can see the levels of excitement and guttoral noises like filler words and sounds. The default value keeps it monotone. I feel the best samples are conversations or interviews. My question now is how will I move this to my DID model so I can animate my avatar. I suppose I can use the same procedure and pump the generated audio to the D-ID.

  • @ShyamJourneyz
    @ShyamJourneyz 9 місяців тому

    Hello, I was wondering if you could help me with my following scenario. I am getting a ValueError two times and was wondering if you knew the cause of it. First one looks like this: "f"Voice '{voice_str}' not found.". The second value error is "Voice 'Bella' not found. I installed using pip3 and I have tried putting the code into both Visual Studio and TextMate. I am running it in the terminal as well. Any help is greatly appreciated. ~New Programmer

  • @RevMan001
    @RevMan001 9 місяців тому

    Looks like there has been a change to how the api key is input now. audio = elevenlabs.generate( api_key= elevenlabs_api_key,

  • @neptosuprananas4434
    @neptosuprananas4434 9 місяців тому

    Hello, the save method isn't working for me

  • @ItsThies
    @ItsThies 9 місяців тому

    Thank you so much, no other videos code worked for me! You're a lifesaver!

  • @vrpig
    @vrpig 10 місяців тому

    brilliant, thankyou so much

  • @joydeepsarkar3092
    @joydeepsarkar3092 10 місяців тому

    Very helpful!

  • @Davicinhoesp
    @Davicinhoesp 10 місяців тому

    Hello! I have a cloned voice in the elevenlabs website, but when I use this voice in the API it has American accent, I wan't Spanish accent, is that possible? I imported 'Accent' but it only allows me to put Britsh, American, Indian and African :(

  • @thiagorottjer87
    @thiagorottjer87 10 місяців тому

    verry good job , helped me a lot to learn how all this works

  • @MoroccanAvatar
    @MoroccanAvatar 10 місяців тому

    why i get this error 'elevenlabs' has no attribute 'generate'

    • @edosetiawan9589
      @edosetiawan9589 8 місяців тому

      Pliss help sir

    • @WorkFlow-tf9jc
      @WorkFlow-tf9jc 6 місяців тому

      @@edosetiawan9589 not a great solution but I installed an older version in terminal (elevenlabs==0.2.27) and then I had to 'brew install ffmpeg' and then it worked!!

    • @otimistarj
      @otimistarj 4 місяці тому

      @@edosetiawan9589 i gave an complex answer. If you know something easier please post here

  • @TanDoori_GamEr
    @TanDoori_GamEr 10 місяців тому

    You Deserve Millions Of Subscribers For this Work. May Allah Success You!

  • @ollie6845
    @ollie6845 10 місяців тому

    don't fall for this trap, you will be very very limited by the eleven labs API if you don't sign in and pay, so it's useless.

  • @eachandeverything111
    @eachandeverything111 10 місяців тому

    Text to Speech is working Good but Eleven Labs allows us "speech to Speech" feature. How it Possible by using Please help

  • @programadorsincero_
    @programadorsincero_ 10 місяців тому

    scare

  • @freepythoncode
    @freepythoncode 10 місяців тому

    Thank you so much 🙂❤ I will change my voice soon 😎

  • @yotamarker
    @yotamarker 11 місяців тому

    fake tutorial : raise ValueError(f"Voice '{voice_str}' not found.") ValueError: Voice 'Bella' not found.

    • @blueboi-wk8gq
      @blueboi-wk8gq 11 місяців тому

      use Arnold instead of bella, bro if there is no bella just looks for other names on the webpage, you could have find out that urself

    • @yotamarker
      @yotamarker 11 місяців тому

      @@blueboi-wk8gq I tried all sorts of voices including Sarah, this library needs some complex 3rd party installation called FFmpeg, which of course is not explained by the uploader seeing as this "tutorial" is another classic example of search engine poisoning.

  • @yeyito7040
    @yeyito7040 11 місяців тому

    Nicole got me 😳

  • @ColinHanra
    @ColinHanra 11 місяців тому

    And it’s free?

  • @profdrkatharinazweig
    @profdrkatharinazweig 11 місяців тому

    Thank you very much for this very informative video. I love that you explain everything you do while typing. Great!

  • @mr-s23
    @mr-s23 11 місяців тому

    this metho d is unlimited?