Hi, I want to use Text-to-speech API and I found this code for python
from pathlib import Path
from openai import OpenAI
client = OpenAI()
speech_file_path = Path(file).parent / “speech.mp3”
response = client.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)
When using, the system informs that the openAI no longer supports TTS API.
How can I use TTS API and anyone know the true code to support TTS please?