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

32 lines
709 B
Go

package domain
import "testing"
func TestIntersperse(t *testing.T) {
got := Intersperse([]int64{1, 2, 3}, 0)
want := []int64{0, 1, 0, 2, 0, 3, 0}
if len(got) != len(want) {
t.Fatalf("Intersperse() = %v, want %v", got, want)
}
for i := range want {
if got[i] != want[i] {
t.Fatalf("Intersperse() = %v, want %v", got, want)
}
}
}
func TestSymbolToIDCoversLetters(t *testing.T) {
for _, r := range "ABCabc012" {
if _, ok := SymbolToID[r]; !ok {
t.Errorf("SymbolToID missing letter/digit %q", r)
}
}
}
func TestSymbolToIDPad(t *testing.T) {
id, ok := SymbolToID['_']
if !ok || id != 0 {
t.Fatalf("SymbolToID['_'] = (%d, %v), want (0, true) - pad must be symbol ID 0", id, ok)
}
}