Deepgram plugin for GetStream
Project description
Deepgram Speech-to-Text Plugin
A high-quality Speech-to-Text (STT) plugin for GetStream that uses the Deepgram API.
Installation
pip install getstream-plugins-deepgram
Usage
from getstream.plugins.deepgram import DeepgramSTT
# Initialize with API key from environment variable
stt = DeepgramSTT()
# Or specify API key directly
stt = DeepgramSTT(api_key="your_deepgram_api_key")
# Register event handlers
@stt.on("transcript")
def on_transcript(text, user, metadata):
print(f"Final transcript from {user}: {text}")
@stt.on("partial_transcript")
def on_partial(text, user, metadata):
print(f"Partial transcript from {user}: {text}")
# Process audio
await stt.process_audio(pcm_data)
# When done
await stt.close()
Configuration Options
api_key: Deepgram API key (default: reads from DEEPGRAM_API_KEY environment variable)options: Deepgram LiveOptions for configuring the transcriptionsample_rate: Sample rate of the audio in Hz (default: 16000)language: Language code for transcription (default: "en-US")keep_alive_interval: Interval in seconds to send keep-alive messages (default: 5.0)
Requirements
- Python 3.10+
- deepgram-sdk>=4.5.0
- numpy>=2.2.6,<2.3
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 getstream_plugins_deepgram-0.1.0-py3-none-any.whl.
File metadata
- Download URL: getstream_plugins_deepgram-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44a1741507bcebd2915c38317e39bffb77ffdcc76dfcaf3b4fee72351b2daf42
|
|
| MD5 |
8b91eb24f98a28b6a4e20b0d3ce11fd1
|
|
| BLAKE2b-256 |
47031f572f23341beb3f1c19b21b50347bcb5e44e21c582fa147a76c3f3b1960
|