Skip to main content

A Python SDK for Inworld AI

Project description

inworld-sdk

A Python SDK for interacting with Inworld AI's platform.

Description

This SDK provides a Python interface for working with Inworld AI'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 ".[dev]"

Basic Usage

import asyncio

import simpleaudio as sa

from inworld_sdk import InworldAIClient


async def main():
  # Initialize the client
  client = InworldAIClient(api_key="<YOUR_API_KEY>")

  # Example: Get voices
  voices = await client.tts.voices()
  print(voices)

  # Example: Synthesize and play speech
  text = "Hello! This is a test of the Inworld AI TTS system."
  sync_buffer = await client.tts.synthesizeSpeechAsWav(text)
  play_obj = sa.WaveObject.from_wave_file(sync_buffer)
  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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

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

inworld_sdk-0.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inworld_sdk-0.2.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file inworld_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: inworld_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for inworld_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f21bf3635dfdbd49ca9ef549954308da10b7442b6bb0e2e64e174cb848b21243
MD5 0addff1cd70f0697178eddcbecf4df6c
BLAKE2b-256 1822a0c4806c9f0f68f2f8afde46ceeacfff558361561eef26a64b02611a8dbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for inworld_sdk-0.2.0.tar.gz:

Publisher: release.yml on MichaelSolati/inworld-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inworld_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: inworld_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for inworld_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad37c8bcb12409fd58cef8b07702b7b87089fe3a65ff5d9d8c4b1d41593d1e6d
MD5 bfcd8b181ab7678b81b26c7e4b24920b
BLAKE2b-256 be51cf32985065350cddc5578905cc13db00bf3942564148c4be10395e9aeee3

See more details on using hashes here.

Provenance

The following attestation bundles were made for inworld_sdk-0.2.0-py3-none-any.whl:

Publisher: release.yml on MichaelSolati/inworld-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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