1
0
mirror of https://github.com/fumiama/ahsai.git synced 2026-06-09 17:50:25 +08:00
This commit is contained in:
fumiama
2022-08-07 16:26:01 +08:00
parent 75e71e2722
commit 11ac7b0d6e
7 changed files with 292 additions and 0 deletions

24
api_test.go Normal file
View File

@@ -0,0 +1,24 @@
package ahsai
import "testing"
func TestAPI(t *testing.T) {
s := NewSpeaker()
err := s.SetName("東北イタコ")
if err != nil {
t.Fatal(err)
}
u, err := s.Speak("こんにちは、世界")
if err != nil {
t.Fatal(err)
}
t.Log(u)
err = PlayOgg(u)
if err != nil {
t.Fatal(err)
}
err = SaveOggToWav(u, "test.wav")
if err != nil {
t.Fatal(err)
}
}