Skip to content

Conversation

@markgoertz
Copy link

I noticed Azure speech has an option to include Confidence levels. Azure Speech NBest, which is not yet supported on pipecat Azure STT Service. Which we want to log with tracing in Langfuse.

This pull request adds support for extracting and tracing confidence scores and detailed NBest transcription data from Azure Speech-to-Text (STT) results.

…NBest data handling

- Added `enable_confidence` parameter to `AzureSTTService` for optional confidence score extraction.
- Implemented `_extract_nbest_from_result` method to parse NBest data from Azure recognition results.

Updated `_on_handle_recognized` and `_on_handle_recognizing` methods to log confidence scores when enabled.
- Modified `traced_stt` decorator to support additional service-specific attributes for tracing.
@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/services/azure/stt.py 0.00% 32 Missing ⚠️
src/pipecat/utils/tracing/service_decorators.py 0.00% 4 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/utils/tracing/service_decorators.py 6.18% <0.00%> (ø)
src/pipecat/services/azure/stt.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant