Spaces:
Sleeping
Sleeping
File size: 1,745 Bytes
aa9892b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | -- Phase 1 (laugh register): κ΄λ¦¬μκ° λ±λ‘ν λν μμ wav ν
νλ¦Ώ.
--
-- μ¬μ© νλ¦:
-- 1. admin νλ©΄μμ λν μ¬μ± μμ wav μ
λ‘λ (e.g. "νΈνν short", "κΉκΉ medium")
-- 2. μ¬μ©μκ° μμ± λ±λ‘ μ (apply_dual μ§ν), λͺ¨λ active ν
νλ¦Ώμ λν΄
-- stylevoice-vc λ‘ source=template, target=user_ref VC μ€ν
-- 3. κ²°κ³Ό wav λ₯Ό user λ³ μΊμ± κ²½λ‘μ μ μ₯ β μ±ν
chunker κ° μμ ν ν°
-- κ°μ§ μ μΊμ±λ λ³ν wav μ¬μ (TTS skip)
--
-- νμΌμ 'voice-clones' λ²ν·μ 'admin/laugh/{uuid}.wav' κ²½λ‘μ μ μ₯.
-- service_role λ§ μ κ·Ό (admin endpoint ν΅ν΄μλ§ μμ ).
CREATE TABLE IF NOT EXISTS public.admin_laugh_templates (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
storage_path TEXT NOT NULL UNIQUE,
duration_sec REAL,
length_class TEXT NOT NULL DEFAULT 'medium'
CHECK (length_class IN ('short', 'medium', 'long')),
is_active BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS admin_laugh_templates_active_idx
ON public.admin_laugh_templates (is_active, length_class)
WHERE is_active = TRUE;
ALTER TABLE public.admin_laugh_templates ENABLE ROW LEVEL SECURITY;
-- μ μ±
μμ: service_role λ§ μ κ·Ό.
COMMENT ON TABLE public.admin_laugh_templates IS
'Phase 1 (laugh register): admin μ΄ λ±λ‘νλ λν μμ ν
νλ¦Ώ. user μμ± λ±λ‘ μ VC λ³νμ source λ‘ μ¬μ©.';
COMMENT ON COLUMN public.admin_laugh_templates.length_class IS
'ν
μ€νΈ κΈΈμ΄ λ§€μΉμ©: short (~1.5s, "νΈν"), medium (~2-3s, "νΈννν"), long (~4-5s, "μΌνννν λ무 μ겨")';
|