a single interface around speech-to-speech foundation models
Project description
.... .- .. --.. . .-.. .- -... ... ✨🎤 pip install spoken 🎤✨ .. - .----. ... / .- / -... .- -.. / -.. .- -.--
spoken provides a single abstraction for a variety of audio foundation models. It is primarily designed for large-scale evaluation/benchmarking of realtime speech-to-speech models, but it can also be used as a drop-in inference library.
import spoken
model = spoken("gpt-4o-realtime-preview-2024-12-17", "examples/scooby.wav")
input_asr, output_asr, output_audio = await model.run()
output_asr # "That's quite the story..."
len(output_audio) # 8549ms
model.output_audio_tokens # 254
Large audio models operate on audio tokens rather than transcribed text. This enables low-latency streaming conversational audio agents that directly generate audio end-to-end. Although promising and exciting, using these models requires non-trivial configuration and state management, due to major providers differing significantly in interface.
(AFAWK,) spoken supports all provider speech-to-speech models.
- OpenAI Realtime
- gpt-4o-realtime-preview-2024-12-17
- gpt-4o-mini-audio-preview-2024-12-17 [coming soon, not part of realtime API]
- Gemini Multimodal Live
- gemini-2.5-flash-preview-native-audio-dialog
- gemini-2.5-flash-exp-native-audio-thinking-dialog
- Amazon Nova Sonic (
pip install spoken[nova])- amazon.nova-sonic-v1:0
Examples
- Benchmarking TTFT (Time-To-First-Token) Latency
- OpenAI System Prompt
- more interesting things coming soon...
Installation
- Simply run
pip install spoken- Python 3.12+ required +
pip install spoken[nova]+portaudio.h(+ OS X:brew install portaudio) for Amazon Nova Sonic support
- Python 3.12+ required +
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
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
File details
Details for the file spoken-0.1.0.tar.gz.
File metadata
- Download URL: spoken-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ab4430fd0af42339540df8e6f6ff2c58a18a48b62cd7452dc52ccc67a52a671
|
|
| MD5 |
00d70b263c6e82b33d5feffb91527f65
|
|
| BLAKE2b-256 |
01f127a97ab76848980443eb1198e727f9af20716a5601c67e598d94d41e39b0
|
File details
Details for the file spoken-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spoken-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9731204b89850e7b9bb58bb3084c54119d6f1a61b9c176ba9a6bf23213548683
|
|
| MD5 |
9bad36128095e5717410e0d3638714cc
|
|
| BLAKE2b-256 |
f373603d33ef672f14e5d33cfd3e11c1eec9a050eef122400ed26d33857535ad
|