1
0
mirror of https://github.com/fumiama/ahsai.git synced 2026-06-13 04:13:13 +08:00
This commit is contained in:
fumiama
2022-08-09 21:29:28 +08:00
parent 8bc34ffb89
commit 6fc506c900

View File

@@ -48,7 +48,7 @@ func main() {
t := sc.Text() t := sc.Text()
i++ i++
if len([]rune(t)) > 100 { if len([]rune(t)) > 100 {
panic("line " + strconv.Itoa(i) + ": too long (> 100 chars)") panic("line " + strconv.Itoa(i+1) + ": too long (> 100 chars)")
} }
lst = append(lst, t) lst = append(lst, t)
} }
@@ -59,7 +59,7 @@ func main() {
for i, t := range lst { for i, t := range lst {
u, err := spk.Speak(t) u, err := spk.Speak(t)
if err != nil { if err != nil {
panic("line " + strconv.Itoa(i) + " error: " + err.Error()) panic("line " + strconv.Itoa(i+1) + " error: " + err.Error())
} }
lst[i] = u lst[i] = u
fmt.Print("\rread: ", (i+1)*100/len(lst), " %") fmt.Print("\rread: ", (i+1)*100/len(lst), " %")