Skip to main content

Simple wrappers for various AI APIs including LLMs, ASR, and TTS

Project description

wraipperz (WIP - agent generated)

Simple wrappers for various AI APIs including LLMs, ASR, and TTS.

Installation

pip install wraipperz
uv add wraipperz

Features

  • LLM API Wrappers: Unified interface for OpenAI, Anthropic, Google, and other LLM providers
  • ASR (Automatic Speech Recognition): Convert speech to text
  • TTS (Text-to-Speech): Convert text to speech
  • Async Support: Asynchronous API calls for improved performance

Quick Start

LLM

import os
from wraipperz import call_ai, MessageBuilder

os.environ["OPENAI_API_KEY"] = "your_openai_key" # if not defined in environment variables
messages = MessageBuilder().add_system("You are a helpful assistant.").add_user("What's 1+1?")

# Call an LLM with a simple interface
response, cost = call_ai(
    model="openai/gpt-4o",
    messages=messages
)

TTS

from wraipperz.api.tts import create_tts_manager

tts_manager = create_tts_manager()

# Generate speech using OpenAI Realtime TTS
response = tts_manager.generate_speech(
    "openai_realtime",
    text="This is a demonstration of my voice capabilities!",
    output_path="realtime_output.mp3",
    voice="ballad",
    context="Speak in a extremelly calm, soft, and relaxed voice.",
    return_alignment=True,
    speed=1.1,
)

# Convert speech using ElevenLabs
# TODO add example

Environment Variables

Set up your API keys in environment variables to enable providers.

OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
GOOGLE_API_KEY=your_google_key
# ...  todo add all

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

wraipperz-0.1.5.tar.gz (183.4 kB view details)

Uploaded Source

Built Distribution

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

wraipperz-0.1.5-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file wraipperz-0.1.5.tar.gz.

File metadata

  • Download URL: wraipperz-0.1.5.tar.gz
  • Upload date:
  • Size: 183.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for wraipperz-0.1.5.tar.gz
Algorithm Hash digest
SHA256 015321b26c7508fb29533e328afc234593a785ed6b37969021000e85e294dfb6
MD5 67582de6fc8add82872ca25c0e46fa2d
BLAKE2b-256 08d4c6f5fb2a58517f5bb3947f3170ff6855b0b255bf8af137cd0e2e5aa336df

See more details on using hashes here.

File details

Details for the file wraipperz-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: wraipperz-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for wraipperz-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 65b3726af674f30ba2fef0ea54d26990d39c67971f8265b9f680c9134aeb9e13
MD5 739be2c39c75543fa88cb5832fc21b4a
BLAKE2b-256 38b1b69d72f15c7f53b19627569f7ce8465d7df11e01822d9ff5218695b88270

See more details on using hashes here.

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