Skip to content

[RD-533] Add SFSpeechRecognizer with Custom Vocab Support#2

Open
dbrkn wants to merge 5 commits intomainfrom
berkin/sfspeechrecognizer
Open

[RD-533] Add SFSpeechRecognizer with Custom Vocab Support#2
dbrkn wants to merge 5 commits intomainfrom
berkin/sfspeechrecognizer

Conversation

@dbrkn
Copy link

@dbrkn dbrkn commented Dec 31, 2025

This PR:

  • Adds a --sfspeech flag to explicitly use SFSpeechRecognizer. The default behavior remains using SpeechAnalyzer.
  • Introduces a --custom-phrases CLI option for adding custom vocabulary support. When this option is used, the CLI automatically switches to SFSpeechRecognizer, since SpeechAnalyzer does not support custom vocab.
  • Removes live mode from SpeechTranscriber to resolve build failure.

dberkin1 added 5 commits December 30, 2025 13:15
- Fix SpeechTranscriber initialization for macOS 26 release
  (use transcriptionOptions/reportingOptions/attributeOptions instead of preset)
- Add --custom-phrases CLI argument for custom vocabulary boosting
- Use AnalysisContext.contextualStrings with vocabulary tag
- Use file-based SpeechAnalyzer initializer

Reference: https://developer.apple.com/documentation/speech/analysiscontext
- contextualStrings only works with SFSpeechRecognizer + server-based recognition
- SpeechTranscriber (macOS 26) ignores contextualStrings
- Auto-switch to SFSpeechRecognizer when --custom-phrases is provided
- Add --server flag to force server-based recognition
- Add --debug flag for troubleshooting
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