Documentation Index
Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
Use this file to discover all available pages before exploring further.
voiceai-sdk is the official Python client for the SLNG API. It targets Python 3.9+ and ships both a synchronous Slng client and an AsyncSlng for asyncio code.
Install
Or with uv:
Initialize the client
Get a key from app.slng.ai, then construct the client:
from voiceai_sdk import Slng
client = Slng() # reads SLNG_API_KEY
client = Slng(api_key="zpka_...") # or pass it explicitly
Text-to-speech
from voiceai_sdk import Slng
client = Slng()
audio = client.text_to_speech.create(
model_variant="slng/deepgram/aura:2-en",
text="Hello from the SLNG Python SDK.",
voice="aura-2-thalia-en",
)
audio.write_to_file("hello.wav")
Speech-to-text
from pathlib import Path
from voiceai_sdk import Slng
client = Slng()
transcript = client.speech_to_text.create(
model_variant="slng/deepgram/nova:3-en",
audio=Path("meeting.wav"),
)
print(transcript.text)
Async client
For asyncio applications, swap Slng for AsyncSlng:
import asyncio
from pathlib import Path
from voiceai_sdk import AsyncSlng
async def main():
client = AsyncSlng()
transcript = await client.speech_to_text.create(
model_variant="slng/deepgram/nova:3-en",
audio=Path("meeting.wav"),
)
print(transcript.text)
asyncio.run(main())
Discover models
models = client.models.list()
voices = client.voices.list(model="slng/deepgram/aura:2-en")
Links