Skip to main content

Fal.ai 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 transcription
  • sample_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


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

If you're not sure about the file name format, learn more about wheel file names.

getstream_plugins_fal-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file getstream_plugins_fal-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for getstream_plugins_fal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0bf6b51da6589e9a56f10d6455202b51abc7df342e767c4435ec16af7ea0fb94
MD5 da236451f0ec73395db6f66a63e8061f
BLAKE2b-256 c92ce8637eec7bf4a03395d0678c816bed101f6c85e137b1321ff41583752f69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page