Przeglądaj źródła

voice recognition test

master
Patrick Peng Sun 9 lat temu
rodzic
commit
4141982bd0
1 zmienionych plików z 4 dodań i 0 usunięć
  1. +4
    -0
      server.go

+ 4
- 0
server.go Wyświetl plik

fmt.Printf("decrypt as: %s", d) fmt.Printf("decrypt as: %s", d)
h := ReadCommonHeader(d) h := ReadCommonHeader(d)
reply, _ := BuildTextMsg(h.MsgType, h.FromUserName) reply, _ := BuildTextMsg(h.MsgType, h.FromUserName)
if h.MsgType == "voice" {
a := ReadVoiceMsg(d)
reply, _ = BuildTextMsg(a.Recognition, h.FromUserName)
}
w.Header().Set("Content-Type", "text/xml; charset=utf-8") w.Header().Set("Content-Type", "text/xml; charset=utf-8")
fmt.Fprint(w, reply) fmt.Fprint(w, reply)
return return

Ładowanie…
Anuluj
Zapisz