Text to Speech Speech to Text

swagger.yaml 2.9KB

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