The simplest way to generate audio is using the convenience methods that handle the entire async workflow for you:
Copy
import audixa# Set your API key (or use AUDIXA_API_KEY env variable)audixa.set_api_key("YOUR_API_KEY")# Generate TTS and get audio URLaudio_url = audixa.tts_and_wait( "Hello! Welcome to Audixa, the best text-to-speech API.", voice="am_ethan",)print(f"Audio URL: {audio_url}")# Or save directly to fileaudixa.tts_to_file( "Hello! Welcome to Audixa.", "output.wav", voice="am_ethan",)
import audixaaudixa.set_api_key("YOUR_API_KEY")# Base model with speed adjustmentaudio_url = audixa.tts_and_wait( "Welcome to Audixa AI, your text-to-speech solution.", voice="am_ethan", model="base", speed=1.1, # Slightly faster (0.5 to 2.0))# Advance model with emotionaudio_url = audixa.tts_and_wait( "This is exciting news! We have launched.", voice="am_ethan", model="advance", emotion="happy", temperature=0.8,)