Download
ffmpeg-git-full.7z:
https://www.gyan.dev/ffmpeg/builds/
Extract & Rename:
Extract the downloaded package.
Rename the extracted folder to “ffmpeg” (remove version details).
Move to Main Drive:
Drag and drop the “ffmpeg” folder onto your main system drive (e.g., C:\).
Place it in the root directory of the drive.
Add to PATH:
Search for “Edit the system environment variables” in the start menu.
Open the System Properties window.
Go to the “Advanced” tab and click “Environment Variables.”
Select the “Path” variable and click “Edit.”
Click “New” and add “C:\ffmpeg\bin” (adjust if you placed it elsewhere).
Now FFmpeg should be usable from any command prompt or application!
restart pycharm
pycharm terminal:
pip install elevenlabs
get the api key from:
https://elevenlabs.io/api
Last edited by Admin on Wed Jul 03, 2024 5:54 pm; edited 2 times in total
ffmpeg-git-full.7z:
https://www.gyan.dev/ffmpeg/builds/
Extract & Rename:
Extract the downloaded package.
Rename the extracted folder to “ffmpeg” (remove version details).
Move to Main Drive:
Drag and drop the “ffmpeg” folder onto your main system drive (e.g., C:\).
Place it in the root directory of the drive.
Add to PATH:
Search for “Edit the system environment variables” in the start menu.
Open the System Properties window.
Go to the “Advanced” tab and click “Environment Variables.”
Select the “Path” variable and click “Edit.”
Click “New” and add “C:\ffmpeg\bin” (adjust if you placed it elsewhere).
Now FFmpeg should be usable from any command prompt or application!
restart pycharm
pycharm terminal:
pip install elevenlabs
Code:
from elevenlabs.client import ElevenLabs
from elevenlabs import play, stream, save
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')
client = ElevenLabs(api_key="my api key")
# Generate TTS audio
audio = client.generate(text="hello world")
# Play audio using ffmpeg
play(audio)
# Save audio to a file
save(audio, "my-file.mp3")
get the api key from:
https://elevenlabs.io/api
Last edited by Admin on Wed Jul 03, 2024 5:54 pm; edited 2 times in total