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
Release history Release notifications | RSS feed
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.7.tar.gz
(200.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
wraipperz-0.1.7-py3-none-any.whl
(28.0 kB
view details)
File details
Details for the file wraipperz-0.1.7.tar.gz.
File metadata
- Download URL: wraipperz-0.1.7.tar.gz
- Upload date:
- Size: 200.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa22f4ba4373d5d3a14bd23ff22a2816bb06ceb5c728194d15d210c9a1e54b31
|
|
| MD5 |
a46050b3f5f1428d085bc93c772f5ef7
|
|
| BLAKE2b-256 |
8de364764a4d16db87d2b15da2ad41bba4af114c32e2ba7873f73c697febc261
|
File details
Details for the file wraipperz-0.1.7-py3-none-any.whl.
File metadata
- Download URL: wraipperz-0.1.7-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54e22e2fb80b7c496eca07ef0577925fa38e99297479f69fd15bf3852a0b14b9
|
|
| MD5 |
0564a9b0baee1622451b636022be27b6
|
|
| BLAKE2b-256 |
27250c621938d987310865740827bdef5567e558bf60f8aabba94dc1623decfb
|