-
Notifications
You must be signed in to change notification settings - Fork 0
fix: align Clip + Voice contracts with the live gateway #48
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
base: main
Are you sure you want to change the base?
Changes from all commits
6650719
26fe02e
d454678
16af177
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -390,7 +390,7 @@ paths: | |
| items: | ||
| $ref: '#/components/schemas/Voice' | ||
|
|
||
| /voice/generate: | ||
| /voice: | ||
| post: | ||
| tags: [Voice] | ||
| summary: Generate speech from text | ||
|
|
@@ -404,20 +404,22 @@ paths: | |
| responses: | ||
| '200': | ||
| description: > | ||
| Speech generated. The gateway returns one of three shapes depending on | ||
| the engine path: an inline JSON payload with base64 audio + character | ||
| `alignment` (single round-trip, carries word timestamps), an async job | ||
| to poll, or raw audio bytes when timestamps were not requested. | ||
| Speech generated. Returns the raw MP3 bytes (`audio/mpeg`) by default (verified | ||
| against the live gateway: POST `/voice` with `{ text }` returns the MP3 directly). | ||
| The `application/json` shapes are returned only when the request opts out of the | ||
| default: requests that ask for character timestamps receive a `VoiceSynthesisInline` | ||
| payload (base64 audio + `alignment`), and engines that process asynchronously return | ||
| a `VoiceGeneration` job to poll. | ||
| content: | ||
| audio/mpeg: | ||
| schema: | ||
| type: string | ||
| format: binary | ||
| application/json: | ||
| schema: | ||
| oneOf: | ||
| - $ref: '#/components/schemas/VoiceSynthesisInline' | ||
| - $ref: '#/components/schemas/VoiceGeneration' | ||
| audio/mpeg: | ||
| schema: | ||
| type: string | ||
| format: binary | ||
| '401': | ||
| $ref: '#/components/responses/Unauthorized' | ||
| '403': | ||
|
|
@@ -2238,14 +2240,17 @@ components: | |
|
|
||
| ClipCreate: | ||
| type: object | ||
| required: [videoId, startTime, endTime] | ||
| required: [source, in, out] | ||
| properties: | ||
| videoId: | ||
| source: | ||
| type: string | ||
| startTime: | ||
| type: number | ||
| endTime: | ||
| type: number | ||
| description: Recording id the clip is cut from (e.g. `rec_abc123`). Verified against the live gateway — the older `{ type, id, start_time, end_time }` source object is rejected. | ||
| in: | ||
| type: string | ||
| description: Start offset as a relative time string, e.g. `5s` or `2m`. | ||
|
Comment on lines
+2248
to
+2250
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. 🔍 Property named
Was this helpful? React with 👍 or 👎 to provide feedback. 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.
|
||
| out: | ||
| type: string | ||
| description: End offset as a relative time string, e.g. `10s` or `1m30s`. | ||
|
Comment on lines
+2243
to
+2253
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. 🔍 Clip response and update schemas still use the old numeric time contract
Was this helpful? React with 👍 or 👎 to provide feedback. 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. Only the ClipCreate request shape was verified against the live gateway; rewriting the Clip response and ClipUpdate schemas without probing the read/update endpoints (which requires gateway credentials unavailable here) would risk documenting an unverified contract. |
||
| title: | ||
| type: string | ||
| description: | ||
|
|
@@ -2398,12 +2403,20 @@ components: | |
|
|
||
| VoiceGenerateRequest: | ||
| type: object | ||
| required: [voiceId, text] | ||
| required: [text] | ||
| # `voiceId` and `voice_id` are wire aliases for the same setting; supplying both is invalid. | ||
| not: | ||
| required: [voiceId, voice_id] | ||
| properties: | ||
| text: | ||
| type: string | ||
|
Comment on lines
+2406
to
2412
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. 1. openapi.yaml exceeds 500 lines openapi.yaml is a touched file and is well over the 500-line limit (it contains content past line 2400). This makes the spec harder to maintain and violates the maximum file-length requirement. Agent Prompt
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. openapi.yaml is a long-standing monolithic spec (2400+ lines before this PR); splitting it to meet the 500-line rule is a large restructuring outside the scope of this contract-alignment PR. |
||
| description: Text to convert to speech. | ||
| voiceId: | ||
| type: string | ||
| text: | ||
| description: Voice id to use. Optional; the gateway picks a default when omitted. Also accepted on the wire as the `voice_id` alias. | ||
| voice_id: | ||
| type: string | ||
| description: Snake_case wire alias for `voiceId` (the form the SDK sends). Provide either `voiceId` or `voice_id`, not both. | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
|
||
| stability: | ||
| type: number | ||
| minimum: 0 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Breaking path rename with no version bump or deprecated alias
/voice/generate→/voiceremoves the old path entirely (CHANGELOG explains the gateway does not serve it), butinfo.versionremains1.0.0(openapi.yaml:24) despite the CHANGELOG labelling this a BREAKING change and the project claiming SemVer adherence. Existing generated clients callinggenerateSpeechwill 404 with no transition period; consider bumping the spec version so downstream consumers detect the break.Was this helpful? React with 👍 or 👎 to provide feedback.