Repository navigation
Native caption API parity with live_transcription, and a mock Talk proxy - #22
Merged
Merged
Conversation
…k proxy
The native routes (/api/v1/..., /capabilities) now match
nextcloud/live_transcription 2.1.3: the same routes, status codes,
{"error": ...} bodies and messages, with no per-user checks. The two
translation routes exist and answer that translation is not available
(550). The language "auto" stays as the one addition.
Talk calls only the app id live_transcription (nextcloud/spreed#20296),
so /mock_talk_proxy/live-transcription/{token} stands in for it: it
makes Talk's checks, then sends the native route a real HTTP request
with the fields and AppAPI headers Talk sends. These are the only
caption routes declared for the browser. /captions/transcribe stays
for one release for panels already open.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AXXsWdprpxxDAGvThQT9Mg
The panel posts to mock_talk_proxy/live-transcription/{token} with its
session id only, as it would to Talk's endpoint, and no longer sends a
language.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AXXsWdprpxxDAGvThQT9Mg
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXXsWdprpxxDAGvThQT9Mg
Set with scripts/release-version.sh (both manifests and their image tag, pyproject.toml, cassini_live/__init__.py, uv.lock). AppAPI reads an app's routes only when its version changes, and this branch adds the mock_talk_proxy routes. Docs that quote the current version or image tag follow. Not tagged; no image is published for 0.11.2. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXXsWdprpxxDAGvThQT9Mg
Member
Author
|
Tried this in staging, merging in for dogfooding |
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.
Why
Cassini Live should work as a stand-in for Nextcloud's
live_transcriptionprovider, with extra capabilities on top. Talk calls only the app idlive_transcription(nextcloud/spreed#20296), so until that changes the panel needs its own way to start captions.What changes
/api/v1/...,/capabilities) answers asnextcloud/live_transcription2.1.3 does: the same routes, status codes,{"error": ...}bodies and message texts, with no per-user checks. An unsupported language is400, no longer422. The languageautostays, and stays the default.GET /api/v1/translation/languages,POST /api/v1/translation/set-target-language). Cassini Live does not translate; they answer550, which Talk reads as "not supported".cassini_live/mock_talk_proxy.py):POSTandDELETE /mock_talk_proxy/live-transcription/{token}stand in for Talk's endpoints. They make Talk's checks (the caller's own session, in the call to start, CSRF header, rate limit), then send the native route a real HTTP request on the app's own socket, with the fields and AppAPI headers Talk sends. These are the only caption routes declared for the browser.POST /captions/transcribeis deprecated. It still works for panels already open during an upgrade.niquests(already installed throughnc-py-api) becomes a direct dependency, for the request to the app's own socket.The mock is temporary. When Talk can call this app: delete the module, its two lines in
app.pyand its manifest routes, and let the panel call Talk's endpoints.Where the native API is not identical to upstream
transcribeis400; upstream accepts any string.550message for translation is "Translation is not supported"; upstream's text tells the administrator to install a translation provider, which would not help here.live_transcription, which is what Talk reads.Notes for review
appinfo/info.xmlgets the same route change only becausescripts/check_manifest.pyrequires the two manifests to match.set-languagefrom the browser, refusing classified and Matrix conversations in the mock, a stored caption language per conversation, guests.Testing
mainon this machine.500because it fails to parse that Nextcloud's task types. Through the browser proxy the mock routes answer as expected and every native route is 404. In a real call the served panel started captions through the mock, finals arrived withseq, andDELETEstopped them.🤖 Generated with Claude Code
https://claude.ai/code/session_01AXXsWdprpxxDAGvThQT9Mg