#Question

1 messages · Page 1 of 1 (latest)

lapis boltBOT
#

Hi @vagrant plank. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Yes, it is possible to open multiple tabs of the Text-to-Speech (TTS) service and input different bodies of text to turn into speech at the same time. However, please note that the rate limits for the TTS API begin at 50 requests per minute (RPM) for paid accounts. This means that if you exceed this limit, you may experience slower response times or even errors. You can check your rate limits in your developer console (https://platform.openai.com/account/limits) (source (https://help.openai.com/en/articles/8555505-tts-api)).

If you're using the API, you can also consider using the streaming feature of the TTS API, which allows the audio to be played before the full file has been generated and made accessible. This can be done by setting stream=True in your API request (source (https://platform.openai.com/docs/guides/text-to-speech)).

Here's an example of how to use the streaming feature in Python:

from openai import OpenAI

client = OpenAI()

response = client.audio.speech.create(
    model="tts-1",
    voice="alloy",
    input="Hello world! This is a streaming test.",
)

response.stream_to_file("output.mp3")

Remember, the maximum input size you can submit per request is 4096 characters, which is equivalent to approximately 5 minutes of audio at default speed (source (https://help.openai.com/en/articles/8555505-tts-api)).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: