Skip to main content

Python client library for the LMNT API

Project description

LMNT Python Library

The LMNT Python library provides convenient access to the LMNT API from applications written in the Python language.

[Documentation]

Installation

Installing from PyPI is the quickest way to get started:

pip install --upgrade lmnt

Install from source with:

python setup.py install

Getting started

The most common operation you'll perform is a synthesize request. Given some text and a voice, it will return an audio file that you can play back. Take a look at our documentation for a deeper dive into the SDK.

import asyncio

from lmnt.api import Speech


LMNT_API_KEY = ...  # fill in your API key here


async def main():
  async with Speech(LMNT_API_KEY) as speech:
    synthesis = await speech.synthesize('Hello, world.', voice='4e95c4a7-95aa-4b1d-bc23-00f7d1d484ea', format='wav')
    with open('output.wav', 'wb') as f:
      f.write(synthesis['audio'])


asyncio.run(main())

More examples

You can find more examples in the demo directory.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmnt-1.1.1.tar.gz (175.1 kB view details)

Uploaded Source

Built Distribution

lmnt-1.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file lmnt-1.1.1.tar.gz.

File metadata

  • Download URL: lmnt-1.1.1.tar.gz
  • Upload date:
  • Size: 175.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for lmnt-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6c2fe7c6d688b1115b5bb9481256db4b5944e949a7d68ac19553148577dc5fbc
MD5 d02fa8c24268c143d5b7a5cdf7ee9b89
BLAKE2b-256 24bd6d9e4a16b8bc46348b1afd1a57157b5e3c6548e9aa514b703d6855915f09

See more details on using hashes here.

File details

Details for the file lmnt-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: lmnt-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for lmnt-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d264579354a86ed9de847d666ebe6e3f5151a3a697570147972d243f8622269
MD5 a61b1ed7bd1eb2774af4a7ca12c04c40
BLAKE2b-256 3437931752e3945855d3c75f2a2d91124dfe38eb56d62b1d11d802d7fdce3a4f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page