Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.attachment.audio-transcribe

Borrowed EARS: a recording somebody attached, as text.

No provider wire carries audio. A voice memo dropped into a message is therefore stored, played back for the human, and NAMED to the model — which is the same dead end a blind model meets in front of a screenshot, and the reason vision-describe exists. The answer here is the same shape, with one difference that decides everything about where it runs: the transcript is not a second-hand report bought from another provider, it is the recording's own WORDS, produced locally by the speech engine this build already carries (com.blockether.vis.internal.speech.core, normally Parakeet on this machine). It costs no quota, it leaves no bytes on anybody's wire, and it is true of the file forever.

WHEN it runs is the whole design. A surface that STAGES a recording — the composer rail, an upload, the gateway's own intake — calls request! the moment the file arrives and paints outcome while the human is still typing. By the time the turn is sent the words are normally already in hand; a turn that finds the work still running JOINS it under a deadline instead of starting its own. Nothing is ever transcribed twice, and nobody waits for a recording that was attached a minute ago.

Four properties keep it affordable and honest:

  • CONTENT-KEYED. Attachments replay on every later request of the session, so the digest of the bytes — not the position, not the filename — is the registry key, and a memo is transcribed exactly once per process.
  • ONE AT A TIME. Local speech saturates a core, so five memos in one message queue on one daemon worker rather than starting five decoders at once.
  • NEVER SILENT. Every miss is an OUTCOME carrying a reason — pending, unavailable, silent (statuses) — logged once and spelled on the wire as transcription_status, because a blank band under a player must never be indistinguishable from a recording that had no words in it. A failure is remembered as a FAILURE and never as "no words"; a reason that describes this moment rather than the file (a model still downloading, a toggle that is off) is not remembered at all.
  • TOTAL. No failure escapes: a recording that could not be transcribed is still stored, still played, and still named to the model.

A LEAF: attachments + voice + toggles, never back on the loop.

Borrowed EARS: a recording somebody attached, as text.

No provider wire carries audio. A voice memo dropped into a message is therefore
stored, played back for the human, and NAMED to the model — which is the same
dead end a blind model meets in front of a screenshot, and the reason
`vision-describe` exists. The answer here is the same shape, with one difference
that decides everything about where it runs: the transcript is not a second-hand
report bought from another provider, it is the recording's own WORDS, produced
locally by the speech engine this build already carries
(`com.blockether.vis.internal.speech.core`, normally Parakeet on this machine). It costs
no quota, it leaves no bytes on anybody's wire, and it is true of the file forever.

WHEN it runs is the whole design. A surface that STAGES a recording — the composer
rail, an upload, the gateway's own intake — calls [[request!]] the moment the file
arrives and paints [[outcome]] while the human is still typing. By the time the
turn is sent the words are normally already in hand; a turn that finds the work
still running JOINS it under a deadline instead of starting its own. Nothing is
ever transcribed twice, and nobody waits for a recording that was attached a
minute ago.

Four properties keep it affordable and honest:

- CONTENT-KEYED. Attachments replay on every later request of the session, so the
  digest of the bytes — not the position, not the filename — is the registry key,
  and a memo is transcribed exactly once per process.
- ONE AT A TIME. Local speech saturates a core, so five memos in one message queue
  on one daemon worker rather than starting five decoders at once.
- NEVER SILENT. Every miss is an OUTCOME carrying a reason — `pending`,
  `unavailable`, `silent` ([[statuses]]) — logged once and spelled on the wire as
  `transcription_status`, because a blank band under a player must never be
  indistinguishable from a recording that had no words in it. A failure is
  remembered as a FAILURE and never as "no words"; a reason that describes this
  moment rather than the file (a model still downloading, a toggle that is off) is
  not remembered at all.
- TOTAL. No failure escapes: a recording that could not be transcribed is still
  stored, still played, and still named to the model.

A LEAF: attachments + voice + toggles, never back on the loop.
raw docstring

available?clj

(available?)

Whether a recording attached RIGHT NOW would be transcribed: the toggle is on, an engine is registered, and that engine can take work (a model still downloading is not a failure — it is a later turn).

Whether a recording attached RIGHT NOW would be transcribed: the toggle is on, an
engine is registered, and that engine can take work (a model still downloading is
not a failure — it is a later turn).
sourceraw docstring

clear-cache!clj

(clear-cache!)

Drop every transcript and every in-flight job. Tests only.

Drop every transcript and every in-flight job. Tests only.
sourceraw docstring

container-extensionclj

(container-extension buffer media-type filename)

The suffix a temp copy is written under, decided by what the bytes ARE.

The name is the one thing a phone gets wrong: a shared iPhone memo is AAC in an MP4 box called .mp3, and a decoder that trusts the suffix reads the wrong format or refuses the file. So the magic answers first, the declared media type second, and the filename — the only one of the three nobody verifies — last.

The suffix a temp copy is written under, decided by what the bytes ARE.

The name is the one thing a phone gets wrong: a shared iPhone memo is AAC in an
MP4 box called `.mp3`, and a decoder that trusts the suffix reads the wrong
format or refuses the file. So the magic answers first, the declared media type
second, and the filename — the only one of the three nobody verifies — last.
sourceraw docstring

enabled?clj

(enabled?)

Whether attachment transcription may run at all.

Whether attachment transcription may run at all.
sourceraw docstring

engineclj

(engine)

The built-in transcription engine, or nil when its native runtime failed to load.

The built-in transcription engine, or nil when its native runtime failed to load.
sourceraw docstring

outcomeclj

(outcome attachment)

What is known about this recording's words RIGHT NOW, without starting anything.

{:transcription "…"} once they exist, {:status "pending"} while the worker has it, a settled {:status …} when it could not be made, and nil when nobody has asked yet — which is what a composer paints as a placeholder and re-reads on the next frame.

What is known about this recording's words RIGHT NOW, without starting anything.

`{:transcription "…"}` once they exist, `{:status "pending"}` while the worker
has it, a settled `{:status …}` when it could not be made, and nil when nobody has
asked yet — which is what a composer paints as a placeholder and re-reads on the
next frame.
sourceraw docstring

PENDINGclj

transcription_status while the words are being made — what a composer paints as a placeholder under the file it has just staged.

`transcription_status` while the words are being made — what a composer paints as
a placeholder under the file it has just staged.
sourceraw docstring

request!clj

(request! attachment)

Start transcribing attachment in the BACKGROUND and answer what is known so far.

The upload-time door: a surface that has just staged a recording calls this and paints the answer — normally {:status "pending"} — so the words are ready before the turn is sent and no turn ever pays for the whole clip. Idempotent per recording, and free for anything that is not audio or already carries a transcript.

Start transcribing `attachment` in the BACKGROUND and answer what is known so far.

The upload-time door: a surface that has just staged a recording calls this and
paints the answer — normally `{:status "pending"}` — so the words are ready
before the turn is sent and no turn ever pays for the whole clip. Idempotent per
recording, and free for anything that is not audio or already carries a
transcript.
sourceraw docstring

request-attachments!clj

(request-attachments! attachments)

Start the words for every recording in attachments and answer the rows with whatever is known NOW — normally pending.

NOTHING waits. This is the call a surface makes the moment files are staged, and the one the turn makes when attachments first land, so the speech is already being made while the human is still typing and while the rest of the turn is assembled.

Start the words for every recording in `attachments` and answer the rows with
whatever is known NOW — normally `pending`.

NOTHING waits. This is the call a surface makes the moment files are staged, and
the one the turn makes when attachments first land, so the speech is already being
made while the human is still typing and while the rest of the turn is assembled.
sourceraw docstring

SILENTclj

transcription_status when the engine read the whole recording and found no speech in it. A fact about the audio, not about the machine.

`transcription_status` when the engine read the whole recording and found no
speech in it. A fact about the audio, not about the machine.
sourceraw docstring

statusesclj

The CLOSED vocabulary of what a surface may be told about a recording whose words it does not have. A row that carries :transcription carries no status at all.

The CLOSED vocabulary of what a surface may be told about a recording whose words
it does not have. A row that carries `:transcription` carries no status at all.
sourceraw docstring

TOGGLE_IDclj

Feature toggle gating attachment transcription (registered in toggles).

Feature toggle gating attachment transcription (registered in `toggles`).
sourceraw docstring

transcribe-attachmentclj

(transcribe-attachment attachment)

This recording's OUTCOME, waiting up to [[JOIN_DEADLINE_MS]] for words.

Work already running is JOINED, never restarted; a recording nobody has asked about is started here. At the deadline the answer is pending and the worker keeps going, so the turn walks away from an hour of speech without throwing it away.

This recording's OUTCOME, waiting up to [[JOIN_DEADLINE_MS]] for words.

Work already running is JOINED, never restarted; a recording nobody has asked
about is started here. At the deadline the answer is `pending` and the worker
keeps going, so the turn walks away from an hour of speech without throwing it
away.
sourceraw docstring

transcribe-attachmentsclj

(transcribe-attachments attachments)

attachments with every RECORDING carrying its own :transcription, or — when there are no words to carry — the :transcription-status that says why.

The call for the moment the words are actually NEEDED: work already running is joined, a recording nobody asked about is started here, and a pass may start at most [[MAX_STARTED_PER_PASS]] of them. Nothing is transcribed twice, and a recording still running at the deadline answers pending rather than holding the turn.

`attachments` with every RECORDING carrying its own `:transcription`, or — when
there are no words to carry — the `:transcription-status` that says why.

The call for the moment the words are actually NEEDED: work already running is
joined, a recording nobody asked about is started here, and a pass may start at
most [[MAX_STARTED_PER_PASS]] of them. Nothing is transcribed twice, and a
recording still running at the deadline answers `pending` rather than holding the
turn.
sourceraw docstring

UNAVAILABLEclj

transcription_status when this machine could not produce the words at all: no engine, a refused container, a throw. It is NOT "the recording is empty".

`transcription_status` when this machine could not produce the words at all: no
engine, a refused container, a throw. It is NOT "the recording is empty".
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close