# LMNT Python Library
The LMNT Python library provides convenient access to the LMNT API from applications written in the Python language.
[[Documentation]](https://docs.lmnt.com/sdk/python/introduction)
## Installation
Installing from PyPI is the quickest way to get started:
```sh
pip install --upgrade lmnt
```
Install from source with:
```sh
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](https://docs.lmnt.com/sdk/python/introduction) for a deeper dive into the SDK.
```python
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='lily', format='wav')
with open('output.wav', 'wb') as f:
f.write(synthesis['audio'])
asyncio.run(main())
```
While you can provide an `api_key` argument, we recommend using `python-dotenv` to add `LMNT_API_KEY="My API Key"` to your `.env` file so that your API key is not stored in source control.
## More examples
You can find more examples in the [demo](demo) directory.
## License
[Apache 2.0](LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/lmnt-com/lmnt-python",
"name": "lmnt",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "speech tts ai ml genai",
"author": "LMNT, Inc.",
"author_email": "feedback@lmnt.com",
"download_url": "https://files.pythonhosted.org/packages/13/56/36d281b93af9cc03e8ad24ff59ae4756f62ce9bc063ac778245a15ae7667/lmnt-1.1.7.tar.gz",
"platform": null,
"description": "# LMNT Python Library\nThe LMNT Python library provides convenient access to the LMNT API from applications written in the Python language.\n\n[[Documentation]](https://docs.lmnt.com/sdk/python/introduction)\n\n## Installation\nInstalling from PyPI is the quickest way to get started:\n\n```sh\npip install --upgrade lmnt\n```\n\nInstall from source with:\n\n```sh\npython setup.py install\n```\n\n## Getting started\n\nThe most common operation you'll perform is a `synthesize` request. Given some text and a voice, it will return an audio\nfile that you can play back. Take a look at our [documentation](https://docs.lmnt.com/sdk/python/introduction) for a deeper dive into the SDK.\n\n```python\nimport asyncio\n\nfrom lmnt.api import Speech\n\n\nLMNT_API_KEY = ... # fill in your API key here\n\n\nasync def main():\n async with Speech(LMNT_API_KEY) as speech:\n synthesis = await speech.synthesize('Hello, world.', voice='lily', format='wav')\n with open('output.wav', 'wb') as f:\n f.write(synthesis['audio'])\n\n\nasyncio.run(main())\n```\n\nWhile you can provide an `api_key` argument, we recommend using `python-dotenv` to add `LMNT_API_KEY=\"My API Key\"` to your `.env` file so that your API key is not stored in source control.\n\n## More examples\n\nYou can find more examples in the [demo](demo) directory.\n\n## License\n[Apache 2.0](LICENSE)\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Python client library for the LMNT API",
"version": "1.1.7",
"project_urls": {
"Homepage": "https://github.com/lmnt-com/lmnt-python"
},
"split_keywords": [
"speech",
"tts",
"ai",
"ml",
"genai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "00607884d3a44a84af9451d6e5de18f624bcbbdfbdf913b0641536153e0957ae",
"md5": "f530aec58981e1afe45d202a84025fa7",
"sha256": "66aaa4c5f2349c40a27c015573bbe579a6df19a1d3fa089745dc4306b4c043af"
},
"downloads": -1,
"filename": "lmnt-1.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f530aec58981e1afe45d202a84025fa7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11113,
"upload_time": "2024-12-07T23:47:56",
"upload_time_iso_8601": "2024-12-07T23:47:56.209974Z",
"url": "https://files.pythonhosted.org/packages/00/60/7884d3a44a84af9451d6e5de18f624bcbbdfbdf913b0641536153e0957ae/lmnt-1.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "135636d281b93af9cc03e8ad24ff59ae4756f62ce9bc063ac778245a15ae7667",
"md5": "a58918ee41a270d89c1cc3df7bba7a07",
"sha256": "1092e8e6e4fd8dea90aa7d60312bca04d2f6ea210d681b430e156b6fe367a085"
},
"downloads": -1,
"filename": "lmnt-1.1.7.tar.gz",
"has_sig": false,
"md5_digest": "a58918ee41a270d89c1cc3df7bba7a07",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 175588,
"upload_time": "2024-12-07T23:47:57",
"upload_time_iso_8601": "2024-12-07T23:47:57.826652Z",
"url": "https://files.pythonhosted.org/packages/13/56/36d281b93af9cc03e8ad24ff59ae4756f62ce9bc063ac778245a15ae7667/lmnt-1.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-07 23:47:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lmnt-com",
"github_project": "lmnt-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "lmnt"
}