Text to Speech Speech to Text

v1.go 455B

12345678910111213141516171819
  1. package router
  2. import (
  3. "git.links123.net/Slate/CorpusAI/cmd/http/handler"
  4. )
  5. func registerV1Router() {
  6. // Auth
  7. public := r.Group("/v1")
  8. //auth := r.Group("/v1").Use(middleware.Auth())
  9. //optionAuth := r.Group("/v1").Use(middleware.OptionalAuth())
  10. public.GET("/en/audio_base_url", handler.GetAudioBaseUrl)
  11. //Text string, LanguageCode, Gender string
  12. public.GET("/en/tts", handler.TextToSpeechMain)
  13. public.POST("/en/stt", handler.SpeechToText)
  14. }