Nik Afiq 5238298b55
Some checks failed
CI / test (push) Successful in 6s
CI / build-ai-gateway (push) Failing after 28s
CI / build-ha-gateway (push) Failing after 24s
CI / build-discord-bot (push) Failing after 29s
Add TTS model components and inference server
- Implemented core model components in `modules.py` including various convolutional layers and normalization techniques.
- Added transformation functions in `transforms.py` for piecewise rational quadratic transformations.
- Created utility functions in `utils.py` for checkpoint management, logging, and hyperparameter handling.
- Introduced monotonic alignment functionality with Cython optimization in `monotonic_align`.
- Developed a minimal inference server in `server.py` to handle synthesis requests.
- Updated requirements to include necessary dependencies for Cython and scipy.
2026-07-24 22:38:36 +09:00

28 lines
627 B
Go

package domain
// Speaker identifies one of the checkpoint's trained voices.
type Speaker struct {
ID int
Name string
}
// SynthesisParams are the VITS sampling knobs exposed to clients, matching
// uma-tts-api's defaults (noise_scale=0.37, noise_scale_w=0.46, length_scale=1.3).
type SynthesisParams struct {
NoiseScale float32
NoiseScaleW float32
LengthScale float32
}
// AudioClip is an encoded audio payload ready to return to a client.
type AudioClip struct {
Data []byte
MimeType string
}
const (
DefaultNoiseScale float32 = 0.37
DefaultNoiseScaleW float32 = 0.46
DefaultLengthScale float32 = 1.3
)