#Rate limit error on trying TTS

1 messages · Page 1 of 1 (latest)

hoary pulsar
#
openai.RateLimitError: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}

I'm getting the above error when trying to use the new tts-1 model. I'm not hitting the rate limit that's there by defaut on a free account. Here's my code:

from pathlib import Path

from config import TTS_API_KEY
from openai import OpenAI

client = OpenAI(api_key=TTS_API_KEY)

speech_file_path = Path(__file__).parent / "speech.mp3"

response = client.audio.speech.create(
    model="tts-1",
    voice="nova",
    input="Hello World",
)

response.stream_to_file(speech_file_path)

It's basically just the example code with the api key added. Any ideas?

cerulean oak
hoary pulsar