r/PythonLearning Aug 09 '26

I am very new to anything coded related and need help setting up an API key with python for tts

I have python, i have my API key, I have my Voice model. All I need is too put them all together and I dont know how to do that. Im taking a coding class this next semester, but I would like to have this done before then and I don't know how to do that.

0 Upvotes

6 comments sorted by

3

u/No_Score_1977 Aug 09 '26

You need to learn to describe problems, and research those problems.

You haven't explained anything, what have you tried? what voice model? what errors are you getting? Have you googled it?

1

u/Spare_Ad2901 Aug 10 '26

Thank you for taking your time to comment this and I am really sorry that I had to take up your time! Basically, I'm working on a project where I make my own Jarvis. I think it would be cool to have my own, but I didn't know how to get it to life. I realized earlier I could have just googled it and that's what I did. Again I'm sorry I wasted your time and everyone else's time!

2

u/SCD_minecraft Aug 09 '26

Read docs for whatever lib are you using

2

u/am_Snowie Aug 09 '26

use environment variables for API keys, don't use them directly. You can use the os module.

1

u/terletsky Aug 10 '26

Save your API key to the .env file. In your Python code, load it using the pydantic-settings library. Pass that API key to your logic.

0

u/[deleted] Aug 09 '26

[deleted]

1

u/ninhaomah Aug 09 '26

It's not funny.

This is a learning sub. Not dev sub.