- 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.
28 lines
627 B
Go
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
|
|
)
|