Client SDKs

Client SDKs

Official SDKs for using LMNT with Python and TypeScript.

LMNT provides official client SDKs to make it easier to work with the LMNT API. Each SDK provides idiomatic interfaces, type safety, and built-in support for streaming, retries, and error handling.

Quick installation

pip install lmnt

Quick start

import asyncio
import os
 
from lmnt import AsyncLmnt
 
async def main():
    client = AsyncLmnt(
        api_key=os.environ.get('LMNT_API_KEY'),  # This is the default and can be omitted
    )
    async with client.speech.with_streaming_response.generate(
        text='hello world.',
        voice='leah',
    ) as response:
        await response.stream_to_file('hello.mp3')
 
asyncio.run(main())

Requirements

SDKMinimum version
Python3.10+
TypeScript4.5+ (Node.js 20+)

GitHub repositories