Skip to content

Commit 3670fa2

Browse files
committed
docs: update readme
1 parent 7bea18b commit 3670fa2

File tree

3 files changed

+47
-110
lines changed

3 files changed

+47
-110
lines changed

examples/fal_stt_translate/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ This sample shows how to build a real-time transcription and translation bot tha
44
Stream video call and converts speech to text (or translates it) using
55
[FAL.ai](https://fal.ai) — specifically the **Wizper** Speech-to-Text model.
66

7-
---
8-
97
## What it does
108

119
- Creates a **transcription bot** that automatically joins a Stream video call
@@ -14,8 +12,6 @@ Stream video call and converts speech to text (or translates it) using
1412
- Prints final transcripts (optionally translated) in the terminal with
1513
timestamps and confidence values
1614

17-
---
18-
1915
## Prerequisites
2016

2117
1. **Stream account** – Get your API key & secret from the
@@ -24,8 +20,6 @@ Stream video call and converts speech to text (or translates it) using
2420
[FAL Console](https://app.fal.ai)
2521
3. **Python 3.10+**
2622

27-
---
28-
2923
## Installation
3024

3125
You can use your preferred package manager, but we recommend [`uv`](https://docs.astral.sh/uv/).
@@ -38,8 +32,6 @@ cd examples/stt_fal_transcription
3832
uv sync
3933
```
4034

41-
---
42-
4335
## Environment variables
4436

4537
Copy `env.example` to `.env` and fill in your credentials:
@@ -53,8 +45,6 @@ FAL_KEY=<your fal api key>
5345
EXAMPLE_BASE_URL=https://getstream.io/video/examples
5446
```
5547

56-
---
57-
5848
## Usage
5949

6050
Run the example:
@@ -72,8 +62,6 @@ What happens next:
7262

7363
Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop the bot.
7464

75-
---
76-
7765
## Customising the STT behaviour
7866

7967
The STT setup is in `main.py`:
@@ -96,8 +84,6 @@ stt = FalWizperSTT(task="translate", target_language="es")
9684
Partial transcripts are not currently supported by Wizper; callbacks fire when
9785
FAL.ai marks a segment as complete.
9886

99-
---
100-
10187
## Troubleshooting
10288

10389
- Double-check that your Stream and FAL keys are correct and present in `.env`.

examples/fal_stt_translate/uv.lock

Lines changed: 13 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

getstream/plugins/fal/README.md

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,57 @@
1-
# Deepgram Speech-to-Text Plugin
1+
# FAL.ai Wizper Speech-to-Text and Translation Plugin
22

3-
A high-quality Speech-to-Text (STT) plugin for GetStream that uses the Deepgram API.
3+
High-quality real-time Speech-to-Text (STT) **and translation** for Stream, powered by
4+
[FAL.ai Wizper](https://fal.ai/models/wizper).
45

56
## Installation
67

78
```bash
8-
pip install getstream-plugins-deepgram
9+
pip install getstream-plugins-fal
910
```
1011

11-
## Usage
12+
## Quick start
1213

1314
```python
14-
from getstream.plugins.deepgram import DeepgramSTT
15+
from getstream.plugins.fal import FalWizperSTT
1516

16-
# Initialize with API key from environment variable
17-
stt = DeepgramSTT()
17+
# 1. Pure transcription (default)
18+
stt = FalWizperSTT()
1819

19-
# Or specify API key directly
20-
stt = DeepgramSTT(api_key="your_deepgram_api_key")
20+
# 2. Translation to Spanish ("es")
21+
stt = FalWizperSTT(target_language="es")
2122

22-
# Register event handlers
2323
@stt.on("transcript")
24-
def on_transcript(text, user, metadata):
25-
print(f"Final transcript from {user}: {text}")
24+
async def on_transcript(text: str, user: dict, metadata: dict):
25+
print(f"{user['name']} said → {text}")
2626

27-
@stt.on("partial_transcript")
28-
def on_partial(text, user, metadata):
29-
print(f"Partial transcript from {user}: {text}")
30-
31-
# Process audio
27+
# Send Stream PCM audio frames to the plugin
3228
await stt.process_audio(pcm_data)
3329

34-
# When done
30+
# Close when finished
3531
await stt.close()
3632
```
3733

38-
## Configuration Options
34+
The plugin emits the standard Stream STT events:
35+
36+
* `transcript` – final, high-confidence text
37+
* `error` – if Wizper returns a failure
38+
39+
## Configuration options
3940

40-
- `api_key`: Deepgram API key (default: reads from DEEPGRAM_API_KEY environment variable)
41-
- `options`: Deepgram LiveOptions for configuring the transcription
42-
- `sample_rate`: Sample rate of the audio in Hz (default: 16000)
43-
- `language`: Language code for transcription (default: "en-US")
44-
- `keep_alive_interval`: Interval in seconds to send keep-alive messages (default: 5.0)
41+
| Parameter | Type | Default | Description |
42+
|--------------------|--------|-------------|----------------------------------------------|
43+
| `target_language` | str\|None | `None` | ISO-639-1 code used when `task="translate"` |
44+
| `sample_rate` | int | `48000` | Incoming PCM sample rate (Hz) |
4545

4646
## Requirements
4747

48-
- Python 3.10+
49-
- deepgram-sdk>=4.5.0
50-
- numpy>=2.2.6,<2.3
48+
* Python 3.10+
49+
50+
## Why Wizper?
51+
52+
Wizper is FAL.ai’s hosted version of Whisper v3 that streams results in
53+
real-time. This means you get:
54+
55+
* Accurate multilingual transcription out-of-the-box
56+
* Fast first-word latency suitable for live calls
57+
* Optional on-the-fly translation to 100+ languages

0 commit comments

Comments
 (0)