Skip to content

Add duration-priced voice cost governance#319

Merged
oratis merged 2 commits into
mainfrom
codex/voice-cost-governance
Jul 26, 2026
Merged

Add duration-priced voice cost governance#319
oratis merged 2 commits into
mainfrom
codex/voice-cost-governance

Conversation

@oratis

@oratis oratis commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • introduce a separate duration-priced media ledger instead of encoding audio as fake tokens
  • parse audio duration server-side for WebM/MP4/WAV/OGG and reject invalid or overlong clips (10-minute default, LISA_VOICE_MAX_SECONDS override)
  • gate signed-in cloud transcription through paid-only account admission, a renewable turn lease, global spend guards, and idempotent settlement
  • price ElevenLabs Scribe v2 at $0.22/hour and OpenAI Whisper at $0.006/minute, then apply the existing 1.4x face-price margin
  • move the ElevenLabs default from scribe_v1 to current scribe_v2
  • route dictation polish through normal LLM admission/settlement; estimate conservatively if a provider omits token usage
  • include media spend/duration/operation counts in the billing usage response
  • preserve local/BYO-key behavior and audit operator-funded shared-token cloud usage

Dependencies

Stacked on #318, which is stacked on #317. Merge order: #317#318 → this PR, retargeting each successor to main as its parent merges.

Pricing sources

Validation

  • npm run typecheck
  • focused media/voice/admission tests — 27 passed
  • npm test — 1456 passed, 1 skipped, 0 failed
  • npm run build
  • npm audit --omit=dev — 3 pre-existing moderate findings in the Google GenAI/MCP/Hono chain; no finding in music-metadata

@oratis
oratis changed the base branch from codex/birth-voice-cost-governance to main July 26, 2026 06:59
@oratis
oratis marked this pull request as ready for review July 26, 2026 07:02
@oratis
oratis merged commit 01c1d93 into main Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant