Skip to content

Oneseco-Media/sites

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Text to Speech Test import openai import pyttsx3 # Set up the OpenAI API client openai.api_key = "YOUR_API_KEY" # Initialize the text-to-speech engine engine = pyttsx3.init() # Start a loop to prompt the user for input and speak my response while True: # Get input from the user input_text = input("What would you like to say? ") # Use the OpenAI API to generate a response response = openai.Completion.create( model="text-davinci-002", prompt=input_text, max_tokens=1024, temperature=0.5, ) # Get the generated response as text response_text = response["choices"][0]["text"] # Speak the response out loud engine.say(response_text) engine.runAndWait()

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages