Text to Speech Speech to Text

swagger.json 6.0KB

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