Skip to content
Open
26 changes: 23 additions & 3 deletions livekit-plugins/livekit-plugins-smallestai/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Smallest AI plugin for LiveKit Agents

Support for speech synthesis with the [Smallest AI](https://smallest.ai/) API.

See the [Smallest AI TTS integration docs](https://docs.livekit.io/agents/models/tts/smallestai/) for more information.
Support for speech synthesis (TTS) and speech recognition (STT) with the [Smallest AI](https://smallest.ai/) API.

## Installation

Expand All @@ -13,3 +11,25 @@ pip install livekit-plugins-smallestai
## Pre-requisites

You'll need an API key from Smallest AI. It can be set as an environment variable: `SMALLEST_API_KEY`

## Usage

### Speech-to-Text (Pulse STT)

```python
from livekit.plugins import smallestai

# Streaming transcription
stt = smallestai.STT(language="en")

# Automatic language detection across 39 languages
stt = smallestai.STT(language="multi")
```

### Text-to-Speech (Lightning TTS)

```python
from livekit.plugins import smallestai

tts = smallestai.TTS(voice_id="emily")
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@

"""Smallest AI plugin for LiveKit Agents

See https://docs.livekit.io/agents/integrations/tts/smallestai/ for more information.
See https://docs.livekit.io/agents/integrations/smallestai/ for more information.
"""

from .tts import TTS, ChunkedStream
from .version import __version__
from .stt import STT as STT, SpeechStream as SpeechStream
from .tts import TTS as TTS, ChunkedStream as ChunkedStream
from .version import __version__ as __version__

__all__ = ["TTS", "ChunkedStream", "__version__"]
__all__ = ["STT", "SpeechStream", "TTS", "ChunkedStream", "__version__"]

from livekit.agents import Plugin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from typing import Literal

TTSModels = Literal[
"lightning",
"lightning-large",
"lightning-v2",
"lightning-v3.1",
]
Expand All @@ -12,4 +10,16 @@
"mp3",
"wav",
"mulaw",
"alaw",
]

STTModels = Literal["pulse"]

STTEncoding = Literal[
"linear16",
"linear32",
"alaw",
"mulaw",
"opus",
"ogg_opus",
]
Loading
Loading