VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.
Python aiaudiobookcudadubbingelevenlabs-alternativehuggingfacelocal-firstmlxomnivoice-studiospeech-to-texttext-to-speechtranscriptiontranslatettsvoice-aivoice-cloningvoice-generationvoicestudioworkflow
Voice Sync Preparation (S2 prep) Implementation Plan
Executed inline by the session that wrote it; the tests named per task are the contract.
Goal: Make voices ready to sync once the server ships blobs. Every voice gets a sync_id, consent is captured as an explicit attestation, a voice without one is never pushed, and the app can encrypt and decrypt VSB1 files.
Spec: account_login/HANDOFF.md ("Get ready for voice sync (S2) now"), account_login/desktop-app-guide.md §4 and §9, and account_login/sync-collections.md (voices).
Builds on: the S0 and S1 plans of 2026-10-16.
Constraints
sync_idis 16 Base62 characters (services.cloud_sync.ids.new_sync_id). It is filled the first time sync is turned on and never changes. Local IDs stay local.- Consent
basisisown_voiceorspeaker_permission, withattested_atin RFC 3339 UTC. A voice with no attestation is never pushed (voice_sync_contentreturnsNone). The consent recording travels only when "Include consent recordings" is on (S2 server phase). VSB1(guide §9):"VSB1"followed by an 8-byte nonce prefix, then chunks of 4 194 304 bytes, each AES-256-GCM. The nonce is the prefix plusuint32_be(i). The AAD is"VSB1"plus theblob_id(16 ASCII bytes),uint32_be(i), and a final-flag byte. Size is12 + plaintext + 16 × n. Any tag failure, or a final flag that is not on the last chunk, fails the whole file. Range decryption is supported. The data key is never written to disk or a log.- Database changes go through alembic (
0015_voice_sync_prep) and are mirrored in_BASE_SCHEMA, so_reconcile_additive_columnsheals databases where alembic cannot run. Existing voices keep working untouched. - Localization: all 21 locales.
Tasks
- Columns and IDs. Alembic 0015 adds
voice_profiles.sync_id,consent_basisandconsent_attested_at, plus a unique partial index onsync_id.cloud_sync/record_ids.ensure_sync_ids()fills missing IDs, andCloudSyncService.turn_oncalls it. Tests: upgrade from 0014 keeps rows; IDs are filled once and are stable; the reconcile step adds the columns without alembic. - Attestation API and the push gate.
POST/DELETE /profiles/{id}/attestation {basis}; profile payloads includeconsent_basisandconsent_attested_at.cloud_sync/voices.voice_sync_content(row)builds thevoicescontent, or returnsNonewhen the voice is not attested. Tests: basis validation, set and clear, no attestation means no content, the content shape matches sync-collections, and the content has no local paths or IDs. VSB1(cloud_sync/vsb1.py). Tests: round trips for 0 bytes, 1 byte, exactly one chunk and one chunk plus 1 byte; the size formula; a tampered tag fails; a truncated file fails (the final flag is missing); wrong magic fails; a chunk-swap fails; a range decrypt of a middle chunk works.- Consent UI. In the voice's consent panel, "This is my voice" and "I have the speaker's permission", with Remove. Strings in 21 locales. Tests: each button posts its basis; an attested voice shows its basis and can clear it.