{ "swagger": "2.0", "info": { "version": "v1", "title": "speechapi", "description": "Speech APIs enable you to recognize speech and convert it to text using advanced machine learning, and also to convert text to speech." }, "host": "api.cloudmersive.com", "schemes": [ "https" ], "paths": { "/speech/recognize/file": { "post": { "tags": [ "Recognize" ], "summary": "Recognize audio input as text using machine learning", "description": "Uses advanced machine learning to convert input audio, which can be mp3 or wav, into text.", "operationId": "Recognize_File", "consumes": [ "multipart/form-data" ], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "speechFile", "in": "formData", "description": "Speech file to perform the operation on. Common file formats such as WAV, MP3 are supported.", "required": true, "type": "file" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SpeechRecognitionResult" } } }, "security": [ { "Apikey": [] } ] } }, "/speech/speak/text/voice/basic/audio": { "post": { "tags": [ "Speak" ], "summary": "Perform text-to-speech on a string", "description": "Takes as input a string and a file format (mp3 or wav) and outputs a wave form in the appropriate format.", "operationId": "Speak_TextToSpeech", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "reqConfig", "in": "body", "description": "String input request", "required": true, "schema": { "$ref": "#/definitions/TextToSpeechRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } } }, "security": [ { "Apikey": [] } ] } }, "/speech/speak/text/basicVoice/{format}": { "post": { "tags": [ "Speak" ], "summary": "Perform text-to-speech on a string", "description": "Takes as input a string and a file format (mp3 or wav) and outputs a wave form in the appropriate format.", "operationId": "Speak_Post", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/octet-stream" ], "parameters": [ { "name": "format", "in": "path", "description": "File format to generate response in; possible values are \"mp3\" or \"wav\"", "required": true, "type": "string" }, { "name": "text", "in": "body", "description": "The text you would like to conver to speech. Be sure to surround with quotes, e.g. \"The quick brown fox jumps over the lazy dog.\"", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } } }, "deprecated": true, "security": [ { "Apikey": [] } ] } } }, "definitions": { "SpeechRecognitionResult": { "description": "Result of recognizing speech", "type": "object", "properties": { "TextResult": { "description": "Recognition result in text format", "type": "string" } } }, "TextToSpeechRequest": { "description": "Input to a Text To Speech request", "type": "object", "properties": { "Format": { "description": "File format for output audio file: wav or mp3, default is mp3", "type": "string" }, "Text": { "description": "Text to be converted to speech", "type": "string" } } } }, "securityDefinitions": { "Apikey": { "type": "apiKey", "description": "API Key Authentication", "name": "Apikey", "in": "header" } } }