inworld-sdk
A Python SDK for interacting with Inworld's platform.
Description
This SDK provides a Python interface for working with Inworld's services, making it easy to integrate AI characters into your applications.
Currently, this SDK only supports the TTS API.
Installation
You can install the package using pip:
pip install inworld-sdk
For development installation:
# Clone the repository
git clone https://github.com/MichaelSolati/inworld-sdk-python.git
cd inworld-sdk-python
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows, use: .\venv\Scripts\activate
# Install the package in development mode with all dependencies
pip install -e .
Basic Usage
import asyncio
import base64
import io
import simpleaudio as sa
from inworld_sdk import InworldClient
async def main():
# Initialize the client
client = InworldClient(api_key="<YOUR_API_KEY>")
client.tts.update_options(audioEncoding="LINEAR16")
# Example: Get voices
voices = await client.tts.voices()
print(voices)
# Example: Synthesize and play speech
text = "Hello! This is a test of the Inworld TTS system."
synthesizedSpeech = await client.tts.synthesizeSpeech(text)
audio_content = synthesizedSpeech.get("audioContent")
decoded_audio = base64.b64decode(audio_content)
wav_file = io.BytesIO(decoded_audio)
play_obj = sa.WaveObject.from_wave_file(wav_file)
play_obj.play().wait_done()
if __name__ == "__main__":
asyncio.run(main())
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Metadata
Release files for inworld-sdk 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inworld_sdk-0.7.0.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inworld_sdk-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / inworld_sdk-0.7.0.tar.gz
| Download URL | inworld_sdk-0.7.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf702129311bda2e190118d815452f050d238ad51641ad80130ceafd60b5278c
|
|
BLAKE2b-256 checksum How to use checksums |
4ce32018750db3110caa13c65b7349b32e726f9f9ce2a16af9e5afeeda6774c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2025.
Transparency logRelease files / inworld_sdk-0.7.0-py3-none-any.whl
| Download URL | inworld_sdk-0.7.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b7afb827732e299d63cf954666f52acf79dd7eb1c354151d258b892a120b0de
|
|
BLAKE2b-256 checksum How to use checksums |
14d0f91796438a88b248536b94fc9dde919d51d5bff981e616666a78b03ce0c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 23, 2025.
Transparency log