feat(Azure STT): add an option to use the lexical form of the transcription#4350
Open
tarekasishm wants to merge 6 commits intolivekit:mainfrom
Open
feat(Azure STT): add an option to use the lexical form of the transcription#4350tarekasishm wants to merge 6 commits intolivekit:mainfrom
tarekasishm wants to merge 6 commits intolivekit:mainfrom
Conversation
Member
|
thanks for the PR, could you run |
davidzhao
reviewed
Dec 22, 2025
| detailed_result = json.loads(evt.result.json) | ||
| lexical = detailed_result.get("NBest", [{}])[0].get("Lexical", None) | ||
| except Exception as e: | ||
| pass |
Member
There was a problem hiding this comment.
exception should be logged at a minimum
Author
There was a problem hiding this comment.
Done! Thank you for the comment
| detailed_result = json.loads(evt.result.json) | ||
| lexical = detailed_result.get("NBest", [{}])[0].get("Lexical", None) | ||
| except Exception as e: | ||
| pass |
theomonnom
reviewed
Dec 23, 2025
| profanity: NotGivenOr[speechsdk.enums.ProfanityOption] = NOT_GIVEN | ||
| phrase_list: NotGivenOr[list[str] | None] = NOT_GIVEN | ||
| explicit_punctuation: bool = False | ||
| lexical_output: bool = False |
Member
There was a problem hiding this comment.
lexical_output isn't exposed since STTOptions is private.
Can you add it to the constructor?
How did you test the PR?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces optional support for returning Azure Speech-to-Text results in lexical format.
✨ What’s new
🔄 Backward compatibility
🧩 Motivation
Some downstream use cases (e.g. custom NLU pipelines, post-processing, or domain-specific text handling) require access to the raw lexical transcription provided by Azure, rather than the normalized output. This change makes that possible without affecting existing integrations.
⚙️ Usage
STTOptions.