Azure STT: pronunciation assessment on the streaming recognizer

Đã đóng
#8,050 0 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

Một pull request liên quan đã được merge.

  • #8102 của @Bilnaa — đã 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
55/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ệ
azure, python
Lĩnh vực
audio-video-rtc, backend

Hướng nghiên cứu

Start by reading the Azure STT implementation in stt.py and its unit tests; the issue says the recognizer setup and _on_recognized are the relevant entry points. Check how SpeechData.metadata is populated for final transcripts, then compare the fork implementation linked in the issue. Done means an optional pronunciation assessment config adds Azure’s scores to each final transcript while leaving default behavior unchanged.

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

We're building a Japanese learning app on top of LiveKit Agents and we score the learner's pronunciation with Azure's pronunciation assessment.

Right now the Azure plugin doesn't let you touch the recognizer before it starts, and _on_recognized only keeps the text. So to get scores we have to send the same audio to Azure a second time, which means paying for the transcription twice.

Azure supports pronunciation assessment directly on continuous recognition: you just apply a PronunciationAssessmentConfig to the recognizer, and every final result comes back with the scores in its JSON.

What I'd like:

  • an optional pronunciation_assessment: speechsdk.PronunciationAssessmentConfig on azure.STT
  • the assessment attached to each final transcript, in SpeechData.metadata["pronunciation_assessment"] (the field is already there for plugin specific data)

Off by default, so nothing changes for anyone else.

Workarounds / Alternatives
  • Second request to Azure with the recorded audio after each turn: works, but double billing and extra latency.
  • Patching the plugin's private methods (_on_recognized, recognizer creation): works too, but it breaks on any plugin update, so we had to pin livekit-plugins-azure.
  • Forking the whole STT in our codebase: that's what we have now, I'd rather not maintain it.
Additional Context

I already have a small implementation on a fork (~40 lines in stt.py + unit tests), tested against the real Azure service with Japanese audio, scores come back on every final:
https://github.com/Bilnaa/agents/tree/azure-recognizer-hooks

Happy to open the PR if the approach looks ok to you, or change the shape of it (e.g. a generic recognizer setup callback instead).

Ngôn ngữ chính
Python
Star
14.6k
Fork
3.9k
Merge trung bình
3 ngày
Pull request đã merge (30 ngày)
262

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.