Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

livekit-plugins-sarvam: support Sarvam keyterms for STT biasing

Đang mở
#7,682 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@15054538509 đang làm issue này rồi.

Từ ngày 9/10/2026.

  • #7683 của @15054538509 — đang mở
  • #7686 của @icebear02 — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
18/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
audio-video-rtc

Hướng nghiên cứu

Start with the SarvamSTT and SarvamStreamingSTT constructors and update_options(), and with how MODEL_CONFIGS gates supports_prompt by model. Check open pull request #7683 first, since it likely already covers this work. Done means keyterms is validated against the 50-term and 64-character limits, sent on the streaming WebSocket connect and in the REST request, and only applied to saaras:v4.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Feature Type: Would make my life easier

Feature Description

Add keyterms support to livekit-plugins-sarvam STT, so callers can bias Sarvam's recognition toward names and domain terms (brands, products, people, places).

Sarvam's API now accepts a keyterms parameter on speech-to-text: a JSON list of strings, up to 50 distinct terms of at most 64 characters each, one term per list item. It is supported on saaras:v4 across REST, Batch, and both WebSocket endpoints (/speech-to-text/ws and /speech-to-text-realtime/ws). Keyterms bias recognition but do not guarantee that a term appears. For streaming, they are fixed when the connection opens and apply to the whole session.

Reference: https://docs.sarvam.ai/api/api-guides-tutorials/speech-to-text/how-to/keyterms

The plugin cannot pass this today:

  • SarvamSTT / SarvamStreamingSTT have no keyterms argument.
  • The existing prompt option is a free-text prompt for saaras translate (see #6606), not a term list, so it cannot stand in for keyterms.
  • I checked livekit-plugins-sarvam 1.6.7 and the latest 1.8.5 wheel. Neither contains keyterm or hotword.

Requested behavior:

  1. A keyterms: list[str] | None option on the STT constructor and update_options(), validated against the 50-term and 64-character limits.
  2. Sent as the keyterms query parameter on the streaming WebSocket connect (URL-encoded, one per item) and as a field in the REST/batch request.
  3. Only applied for models that support it (saaras:v4), consistent with how MODEL_CONFIGS handles supports_prompt.

Workarounds / Alternatives

We are currently unable to use keyterms through the plugin. The options we see are a raw WebSocket client that adds the query parameter ourselves, or patching the plugin locally. Both leave us maintaining Sarvam-specific transport code that the plugin should own.

Additional Context

  • Sarvam pricing does not list a separate charge for keyterms. The docs list per-hour speech-to-text rates only.
  • Related: #6606 (closed) covers supports_prompt for saaras:v3 on the same endpoint.
Ngôn ngữ chính
Python
Star
14.6k
Fork
3.9k
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
207

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của livekit/agents

Tất cả issue của livekit/agents

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.