> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Meet per-speaker operations

> How an operator settles a per-speaker transcript chunk that was dispatched to the provider but never answered.

Per-speaker transcription (`self_v1`) reserves each chunk's maximum cost on
its session before the provider is called, and settles the reservation once
the outcome is known. The product rules are on
[Per-speaker meeting transcription](https://docs.tuturuuu.com/platform/features/meet-per-speaker-transcription.md).

## Dispatched chunk that never settled

The Meet Worker settles every chunk itself: `released` for a failure before
dispatch, `discarded` or `completed` with the measured cost after the provider
answers, and `unknown` when the provider call fails after dispatch. A Worker
that is stopped or evicted during the provider call can leave a chunk with its
reservation still open. Such a chunk keeps holding its reservation against the
session's `cost_cap_usd` and never shows text.

### Find them

Read-only, with the service role:

```sql theme={null}
select c.id, c.session_id, c.account_id, c.attempt_started_at, c.reserved_cost_usd
from public.meet_ai_chunks c
where c.stream_id is not null
  and c.status = 'processing'
  and c.reservation_state = 'reserved'
  and c.dispatch_consent_revision is not null
  and c.attempt_started_at < now() - interval '10 minutes';
```

`dispatch_consent_revision is not null` means `mark_dispatch` ran, so the
provider may have been called and billed. A chunk with a null dispatch
revision never reached the provider and is not part of this procedure.

The 10-minute threshold keeps the procedure away from chunks a live Worker is
still settling. `attempt_started_at` is set by `mark_dispatch`; after it, a
Worker makes one provider call (aborted after 55 s, `abortSignal` in
`packages/ai/src/meetings/gemini.ts`), two room checks (each an authorize plus
an ack call of up to 10 s) and outbox and billing writes. It usually settles
within about 2 minutes, but there is no hard bound, because those writes have
no client timeout; that is why the threshold is 10 minutes. Settling a chunk
the Worker is still processing makes the Worker's own `completed` settle fail
with `55000`, and the transcript text is lost. Never shorten the threshold
below about 5 minutes, and raise it if the provider timeout grows.

### Settle as `unknown`

Settle each chunk found above as `unknown`. This is a production database
write: it follows the production write approval rules, like any other.

```sql theme={null}
select private.meet_ai_self_v1_settle_chunk('<chunk id>', 'unknown', null, null, null);
```

* `unknown` moves the chunk's full reservation into the session's
  `cost_unknown_usd`, where it keeps counting against the cost cap. Unknown
  cost is never released.
* The call is idempotent: settling the same chunk as `unknown` again returns
  the row unchanged. Any other outcome after settlement is refused (`55000`).
* Never use `released` (the database refuses it after dispatch) and never use
  `completed` or `discarded` (both need a measured provider cost, and
  `completed` also needs the speaker's current consent).

### What else to expect

* The chunk shows as failed and keeps no text. A resend of the same chunk id
  returns the failed chunk without another provider call.
* The central AI run that was opened for the attempt stays pending until its
  reservation expires (30 minutes); no credits are charged for it. The
  uploader's own credits are never involved.
* Once settled, the post-call review route counts the chunk in
  `unpricedRequests` for the host.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.