#I have a problem with TTS model and

1 messages ยท Page 1 of 1 (latest)

hard gull
#

Please, continue here ๐Ÿ™‚

spark sonnet
#
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

hard gull
#

Nope ๐Ÿ˜„ Here response = openai.Audio.speech.create( is also error.

#

import openai
client = openai.OpenAI()

AttributeError: module 'openai' has no attribute 'OpenAI'

spark sonnet
#

remove that part

#

just put the thing i sent

#

if u do pip show openai does it say 1.2.0?

hard gull
#

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