from openai import OpenAI from pathlib import Path client = OpenAI(base_url="https://api.naga.ac/v1", api_key="YOUR_API_KEY") speech_file_path = Path("speech.mp3") resp = client.audio.speech.create( model="heygen-voice-1-turbo", voice="alloy", input="Hello from NagaAI Text-to-Speech!" ) resp.stream_to_file(speech_file_path)
HeyGen Voice is HeyGen's in-house voice model. Use a public voice or create a clone from a recording. Public voices and clones use the same speech endpoints. heygen-voice-1-turbo is the faster speech generation tier.