Spaces:
Sleeping
Sleeping
Download backend/sql/007_user_laugh_cache.sql from stylevoice/talk: direct link, hf CLI and curl.
- Browser
- Download file 2.24 kB
-
https://huggingface.co/spaces/stylevoice/talk/resolve/main/backend/sql/007_user_laugh_cache.sql
- Command line
-
hf download hf://spaces/stylevoice/talk/backend/sql/007_user_laugh_cache.sql
-
curl -L -o 007_user_laugh_cache.sql https://huggingface.co/spaces/stylevoice/talk/resolve/main/backend/sql/007_user_laugh_cache.sql
2.24 kB
| -- Phase 2 (laugh register): μ¬μ©μλ³ λ³νλ μμ wav μΊμ. | |
| -- | |
| -- μ¬μ©μκ° μμ± μ€μ μμ apply_dual νΈμΆ μ λ°±κ·ΈλΌμ΄λ μμ μ΄ λͺ¨λ active | |
| -- admin μμ ν νλ¦Ώμ μ¬μ©μ ref μμμΌλ‘ λ³ν β κ²°κ³Ό wav λ₯Ό storage μ μ μ₯. | |
| -- μ±ν chunker (Phase 3) κ° μμ ν ν° κ°μ§ μ μ΄ μΊμμμ wav url μ‘°ν. | |
| -- | |
| -- ν€: (user_id, voice_storage_path, template_id) β ν μ¬μ©μμ κ°μ μμ± ref | |
| -- + κ°μ ν νλ¦Ώ μ‘°ν©λΉ 1ν. κ°μ μμ±μ΄λ©΄ voice_storage_path λμΌνλ―λ‘ dual | |
| -- register (casual/formal) μμͺ½μ΄ 곡μ . | |
| CREATE TABLE IF NOT EXISTS public.user_laugh_cache ( | |
| id UUID PRIMARY KEY DEFAULT gen_random_uuid(), | |
| user_id UUID NOT NULL REFERENCES auth.users(id) ON DELETE CASCADE, | |
| voice_storage_path TEXT NOT NULL, -- μ¬μ©μ ref wav μ storage_path | |
| template_id UUID NOT NULL REFERENCES public.admin_laugh_templates(id) ON DELETE CASCADE, | |
| laugh_storage_path TEXT NOT NULL, -- λ³νλ wav μ storage_path (voice-clones λ²ν·) | |
| ready BOOLEAN NOT NULL DEFAULT FALSE, -- λ³ν μ±κ³΅ = TRUE | |
| error TEXT, -- λ³ν μ€ν¨ μ λ©μμ§ (~500 chars truncate) | |
| duration_sec REAL, -- λ³νλ wav μ μ¬μ μκ° | |
| created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), | |
| updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), | |
| UNIQUE (user_id, voice_storage_path, template_id) | |
| ); | |
| CREATE INDEX IF NOT EXISTS user_laugh_cache_user_voice_idx | |
| ON public.user_laugh_cache (user_id, voice_storage_path) | |
| WHERE ready = TRUE; | |
| ALTER TABLE public.user_laugh_cache ENABLE ROW LEVEL SECURITY; | |
| -- μ μ± μμ: service_role λ§ μ κ·Ό. νλ‘ νΈλ λ°±μλ API ν΅ν΄μ μ‘°ν. | |
| COMMENT ON TABLE public.user_laugh_cache IS | |
| 'Phase 2 (laugh register): μ¬μ©μ ref Γ admin ν νλ¦Ώ λ³ν μΊμ. apply_dual μ§ν λ°±κ·ΈλΌμ΄λ VC μμ μ΄ μ±μ.'; | |
| COMMENT ON COLUMN public.user_laugh_cache.voice_storage_path IS | |
| 'μ¬μ©μ ref wav μ storage_path (μ: {user_id}/{stem}.wav). dual register μ casual/formal μμͺ½μ΄ κ°μ path 곡μ .'; | |
| COMMENT ON COLUMN public.user_laugh_cache.laugh_storage_path IS | |
| 'λ³νλ wav (μ: {user_id}/laughs/{stem}_{template_id}.wav).'; | |