Python
Together AI SDK (Python)
from together import Togetherimport osclient = Together( api_key=os.environ.get("TOGETHER_API_KEY"),)response = client.audio.speech.create( model="cartesia/sonic-2", input="The quick brown fox jumps over the lazy dog.", voice="laidback woman",)response.stream_to_file("audio.wav")
This response does not have an example.
Generate audio from input text
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
OK
The response is of type file.
file
Was this page helpful?