Text to Speech Speech to Text

docs.go 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  2. // This file was generated by swaggo/swag at
  3. // 2018-10-17 20:53:09.6090834 +0800 CST m=+0.097091800
  4. package docs
  5. import (
  6. "github.com/swaggo/swag"
  7. )
  8. var doc = `{
  9. "swagger": "2.0",
  10. "info": {
  11. "description": "Campus text to speech / speech to text.",
  12. "title": "Campus AI API",
  13. "termsOfService": "http://swagger.io/terms/",
  14. "contact": {
  15. "name": "API Support",
  16. "email": "slate@links123.com"
  17. },
  18. "license": {},
  19. "version": "1.0"
  20. },
  21. "host": "campusai.links123.net",
  22. "basePath": "/v1",
  23. "paths": {
  24. "/en/audio_base_url": {
  25. "get": {
  26. "description": "获取音频接口base url(主要用于海内外接口地址分开)",
  27. "consumes": [
  28. "application/json"
  29. ],
  30. "produces": [
  31. "application/json"
  32. ],
  33. "tags": [
  34. "语料库"
  35. ],
  36. "summary": "获取音频接口base url",
  37. "parameters": [
  38. {
  39. "type": "string",
  40. "description": "IP地址, 默认无需传, 自动获取",
  41. "name": "ip",
  42. "in": "query"
  43. }
  44. ],
  45. "responses": {
  46. "200": {
  47. "description": "{\"audio_base_url\": \"https://campusai.links123.com/v1/en/tts\",\"country_code\": \"国家code\",\"ip\": \"ip地址\"}",
  48. "schema": {
  49. "type": "string"
  50. }
  51. },
  52. "400": {
  53. "description": "{\"msg\": \"error info\"}",
  54. "schema": {
  55. "type": "string"
  56. }
  57. },
  58. "500": {
  59. "description": "{\"msg\": \"error info\"}",
  60. "schema": {
  61. "type": "string"
  62. }
  63. }
  64. }
  65. }
  66. },
  67. "/en/stt": {
  68. "post": {
  69. "description": "speech to Text",
  70. "consumes": [
  71. "application/json"
  72. ],
  73. "produces": [
  74. "application/json"
  75. ],
  76. "tags": [
  77. "语料库"
  78. ],
  79. "summary": "语音转文本",
  80. "parameters": [
  81. {
  82. "type": "file",
  83. "description": "发音文件",
  84. "name": "file",
  85. "in": "query",
  86. "required": true
  87. },
  88. {
  89. "type": "string",
  90. "description": "语言,en英文,zh中文,默认英文",
  91. "name": "language",
  92. "in": "path"
  93. },
  94. {
  95. "type": "integer",
  96. "description": "码率,8/16 默认16",
  97. "name": "rate",
  98. "in": "path"
  99. }
  100. ],
  101. "responses": {
  102. "200": {
  103. "description": "test",
  104. "schema": {
  105. "type": "string"
  106. }
  107. },
  108. "400": {
  109. "description": "{\"msg\": \"error info\"}",
  110. "schema": {
  111. "type": "string"
  112. }
  113. },
  114. "500": {
  115. "description": "{\"msg\": \"error info\"}",
  116. "schema": {
  117. "type": "string"
  118. }
  119. }
  120. }
  121. }
  122. },
  123. "/en/tts": {
  124. "get": {
  125. "description": "Text to speech",
  126. "consumes": [
  127. "application/json"
  128. ],
  129. "produces": [
  130. "application/json"
  131. ],
  132. "tags": [
  133. "语料库"
  134. ],
  135. "summary": "文本转语音",
  136. "parameters": [
  137. {
  138. "type": "string",
  139. "description": "单词/短语/句子",
  140. "name": "text",
  141. "in": "query"
  142. },
  143. {
  144. "enum": [
  145. "en-US",
  146. "en-GB"
  147. ],
  148. "type": "string",
  149. "description": "en-US(美音)/en-GB(英音)",
  150. "name": "languageCode",
  151. "in": "query"
  152. },
  153. {
  154. "enum": [
  155. "MALE",
  156. "FEMALE"
  157. ],
  158. "type": "string",
  159. "description": "MALE(男音)/FEMALE(女音)",
  160. "name": "gender",
  161. "in": "query"
  162. }
  163. ],
  164. "responses": {
  165. "302": {
  166. "description": "https://lnks123-campus-tts-hk.oss-cn-hongkong.aliyuncs.com/xxxx.mp3",
  167. "schema": {
  168. "type": "string"
  169. }
  170. },
  171. "400": {
  172. "description": "{\"msg\": \"error info\"}",
  173. "schema": {
  174. "type": "string"
  175. }
  176. },
  177. "500": {
  178. "description": "{\"msg\": \"error info\"}",
  179. "schema": {
  180. "type": "string"
  181. }
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }`
  188. type s struct{}
  189. func (s *s) ReadDoc() string {
  190. return doc
  191. }
  192. func init() {
  193. swag.Register(swag.Name, &s{})
  194. }