You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentation for SmallestSTTService introduced in pipecat PR #4162.
- Created server/services/stt/smallest.mdx with full configuration and usage
- Added to docs.json navigation (Speech-to-Text section)
- Added to supported-services.mdx table
The new service provides real-time speech-to-text using Smallest AI's Pulse
WebSocket API with support for multiple languages, diarization, PII redaction,
and other advanced transcription features.
description: "Speech-to-text service using Smallest AI's Pulse WebSocket API"
4
+
---
5
+
6
+
## Overview
7
+
8
+
Smallest AI provides real-time speech-to-text transcription through a WebSocket-based integration with their Waves API. The service uses the Pulse model to stream audio continuously and receive interim and final transcription results with low latency.
P99 latency from speech end to final transcript in seconds. Used for
70
+
processing metrics.
71
+
</ParamField>
72
+
73
+
### Settings
74
+
75
+
Runtime-configurable settings passed via the `settings` constructor argument using `SmallestSTTService.Settings(...)`. These can be updated mid-conversation with `STTUpdateSettingsFrame`. See [Service Settings](/guides/fundamentals/service-settings) for details.
|`model`|`str`|`pulse`| Model identifier. Currently only `pulse` is supported. |
80
+
|`language`|`Language \| str`|`Language.EN`| Language code for transcription. |
81
+
|`word_timestamps`|`bool`|`False`| Include word-level timestamps in transcription results. |
82
+
|`full_transcript`|`bool`|`False`| Include cumulative transcript in results. |
83
+
|`sentence_timestamps`|`bool`|`False`| Include sentence-level timestamps in transcription results. |
84
+
|`redact_pii`|`bool`|`False`| Redact personally identifiable information from transcripts. |
85
+
|`redact_pci`|`bool`|`False`| Redact payment card information from transcripts. |
86
+
|`numerals`|`str`|`auto`| Convert spoken numerals to digits. Options: `auto`, `always`, or `none`. |
87
+
|`diarize`|`bool`|`False`| Enable speaker diarization to identify different speakers. |
88
+
89
+
## Usage
90
+
91
+
### Basic Setup
92
+
93
+
```python
94
+
from pipecat.services.smallest.stt import SmallestSTTService
95
+
from pipecat.transcriptions.language import Language
96
+
97
+
stt = SmallestSTTService(
98
+
api_key=os.getenv("SMALLEST_API_KEY"),
99
+
settings=SmallestSTTService.Settings(
100
+
language=Language.EN,
101
+
),
102
+
)
103
+
```
104
+
105
+
### With Advanced Features
106
+
107
+
```python
108
+
stt = SmallestSTTService(
109
+
api_key=os.getenv("SMALLEST_API_KEY"),
110
+
settings=SmallestSTTService.Settings(
111
+
language=Language.ES,
112
+
word_timestamps=True,
113
+
diarize=True,
114
+
redact_pii=True,
115
+
),
116
+
)
117
+
```
118
+
119
+
### Updating Settings at Runtime
120
+
121
+
Transcription settings can be changed mid-conversation using `STTUpdateSettingsFrame`:
122
+
123
+
```python
124
+
from pipecat.frames.frames import STTUpdateSettingsFrame
125
+
from pipecat.services.smallest.stt import SmallestSTTSettings
126
+
127
+
await task.queue_frame(
128
+
STTUpdateSettingsFrame(
129
+
delta=SmallestSTTSettings(
130
+
language=Language.FR,
131
+
word_timestamps=False,
132
+
)
133
+
)
134
+
)
135
+
```
136
+
137
+
<Tip>
138
+
Changing settings will trigger a WebSocket reconnection, which may cause a
139
+
brief interruption in transcription.
140
+
</Tip>
141
+
142
+
## Notes
143
+
144
+
-**WebSocket streaming**: The service uses WebSocket connections for real-time streaming. The connection is automatically managed and will reconnect if interrupted.
145
+
-**VAD integration**: Uses Pipecat's VAD to detect when the user stops speaking and sends a finalize message to flush the final transcript.
146
+
-**Keepalive**: The service sends periodic keepalive messages (every 5 seconds) to prevent idle timeouts on the WebSocket connection.
0 commit comments