#I have a problem with TTS model and
1 messages ยท Page 1 of 1 (latest)
from pathlib import Path
import openai
speech_file_path = Path(__file__).parent / "speech.mp3"
response = openai.Audio.speech.create(
model="tts-1",
voice="alloy",
input="Today is a wonderful day to build something people love!"
)
response.stream_to_file(speech_file_path)
see if this works
Nope ๐ Here response = openai.Audio.speech.create( is also error.
import openai
client = openai.OpenAI()
AttributeError: module 'openai' has no attribute 'OpenAI'
remove that part
just put the thing i sent
if u do pip show openai does it say 1.2.0?
Requirement already satisfied: openai in .......\python\python310\lib\site-packages (1.2.0)
But wait... NOW is the next version of openai lib ๐ 1.2.1 released this 1 hour ago
Maybe... this help
Well.. also not, BUT... I noticed THIS ๐
Successfully installed openai-1.2.1 Note: you may need to restart the kernel to use updated packages.
After restarting a kernel I get another errors, but it explained a lot. It was simply running the old kernel all the time, ignoring the openai update ๐
Thanks for help! @spark sonnet