feat: 글자속도·단어간격·문장간격 독립 조절 + atempo 기본 타임스트레치
- 타임스트레치 우선순위를 ffmpeg atempo(기본) → rubberband → librosa 로 변경 - MeloEngine: 문장 단위로 분리 후 문장 사이 무음(sentence_gap), 단어(어절) 사이 무음(word_gap)을 타임스트레치와 독립적으로 삽입. speed 는 글자(음소) 속도만 조절 - API(TTSRequest)에 word_gap/sentence_gap 필드 추가, 전 엔진 시그니처 확장 - 프론트엔드에 '글자 속도/단어 간격/문장 간격' 슬라이더 추가, supports 플래그로 미지원 엔진(supertonic/oute/cosy)에서는 간격 슬라이더 자동 비활성화
This commit is contained in:
@@ -42,7 +42,12 @@ class CosyVoiceEngine(BaseEngine):
|
||||
],
|
||||
}
|
||||
],
|
||||
"supports": {"speed": True, "pitch": True},
|
||||
"supports": {
|
||||
"speed": True,
|
||||
"pitch": True,
|
||||
"word_gap": False,
|
||||
"sentence_gap": False,
|
||||
},
|
||||
}
|
||||
|
||||
def synth_wav(
|
||||
@@ -52,6 +57,8 @@ class CosyVoiceEngine(BaseEngine):
|
||||
speaker: str | None = None,
|
||||
speed: float = 1.0,
|
||||
pitch: float = 0.0,
|
||||
word_gap: float = 0.0,
|
||||
sentence_gap: float | None = None,
|
||||
) -> bytes:
|
||||
text = (text or "").strip()
|
||||
if not text:
|
||||
|
||||
Reference in New Issue
Block a user