Synth (Audio Synthesis): foundations

accepted

Status

accepted — ratificada 2026-05-09 (mesmo dia da abertura) como parte da onda piloto de bootstrap servicesai. Implementação iniciada em `servicesaisynth; tickets em servicesaisynthbacklogpending/{001..005}`.

Summary

Foundation pra síntese de áudio — TTS (text-to-speech), música, SFX. Self-hosted CoquiPiperAudioCraft + proxy ElevenLabs/Suno via gateway.

Motivation

voice/ faz só STT (in). TTS, música, SFX = zero. Bloqueia Talk Mode bidirecional (specs/voice/wake-word.kmd), narração, audio branding. Koder Talk só responde por texto hoje.

Scope

In

  • TTS (multilíngue pt-BR + en-US prioritário)
  • Voice cloning consensual
  • SFX gen
  • Música curta (até 30s)

Out (yet)

  • Música longa (custo proibitivo)
  • Audio editing/mastering

Initial design

Surfaces

  • backend/ — Go API + worker GPU
  • app/ — não aplicável v1

Key APIs

  • POST /v1/synth/tts — texto pra fala
  • POST /v1/synth/clone — voice cloning a partir de sample
  • POST /v1/synth/music — geração musical
  • POST /v1/synth/sfx — sound effects

Dependencies

  • services/ai/voice — compartilha pipeline áudio
  • services/ai/gateway — proxy ElevenLabs/Suno
  • services/ai/runtime — modelos locais (CoquiPiperAudioCraft)

Relation to existing sectors

  • Par de voice/ (input) — possível fusão futura como audio/ (in + out)
  • Bloqueador de Talk Mode bidirecional em produtos Koder

Self-hosted-first analysis (5 gates)

  • G1 Feature parity: zero
  • G2 Performance: N/A
  • G3 Stability: N/A
  • G4 Capability: Coqui/Piper viáveis local
  • G5 Critical-path readiness: bloqueia Talk Mode round-trip

Open questions

  • Q1: Renomear voiceaudio com audio.stt/audio.tts ou manter sectors separados?
  • Q2: Voice cloning — política de consent?

Next steps

  1. Ratificar esta RFC (1 round de comments).
  2. Criar sector dir services/ai/synth/ com koder.toml, README.md, skeleton.
  3. Abrir tickets de implementação em services/ai/synth/backlog/pending/.
  4. Registrar em meta/docs/stack/registries/self-hosted-pairs.md se substituir externo.