-
-
Notifications
You must be signed in to change notification settings - Fork 263
feat: add OpenAI diarization support #651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
8times4
wants to merge
5
commits into
TanStack:main
Choose a base branch
from
8times4:feat/openai-transcription-diarization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,101
−212
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c82735e
add diarization support
8times4 fbb57a0
fix coderabbit recommendations
8times4 c7cf3fc
refactor: update transcription options and support for diarization
8times4 58aa20c
fix coderabbit findings
8times4 23b15bc
refactor: update transcription response formats and validation
8times4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
refactor: update transcription response formats and validation
- Removed 'diarized_json' from the allowed response formats in both the server functions and API schemas. - Updated the TranscriptionResponseFormat type to reflect the removal of 'diarized_json'. - Enhanced error handling in the OpenAI transcription adapter to ensure that known speaker names and references are provided together. - Added tests to validate the new requirements for speaker diarization in the transcription process.
- Loading branch information
commit 23b15bc38804153c18296f85f6735d6daab89544
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,9 +42,7 @@ function testHeaders(testId?: string): Record<string, string> | undefined { | |
| function getOpenaiTranscriptionModel(options: TranscriptionAdapterOptions) { | ||
| const modelOptions = options.modelOptions | ||
| const isDiarizationRequest = | ||
| options.responseFormat === 'diarized_json' || | ||
| modelOptions?.response_format === 'diarized_json' || | ||
| modelOptions?.diarize === true || | ||
| modelOptions?.chunking_strategy !== undefined || | ||
| modelOptions?.known_speaker_names !== undefined || | ||
| modelOptions?.known_speaker_references !== undefined | ||
|
Comment on lines
+42
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "1) Find where diarize is populated in E2E request construction"
rg -n --type=ts -C2 '\bdiarize\b|response_format|chunking_strategy|known_speaker_' testing/e2e/src
echo
echo "2) Confirm modelOptions is forwarded from API routes"
rg -n --type=ts -C3 'generateTranscription\(|modelOptions,' \
testing/e2e/src/routes/api.transcription.ts \
testing/e2e/src/routes/api.transcription.stream.ts
echo
echo "3) Confirm OpenAI adapter request spread behavior"
rg -n --type=ts -C5 '\.\.\.modelOptions|TranscriptionCreateParamsNonStreaming|request\.response_format' \
packages/ai-openai/src/adapters/transcription.tsRepository: TanStack/ai Length of output: 5925 Prevent internal
🤖 Prompt for AI Agents |
||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.