2023-08-27 21:53:49 +05:30
|
|
|
definitions:
|
2023-09-11 09:15:41 +05:30
|
|
|
libmozhi.LangOut:
|
2023-08-27 21:53:49 +05:30
|
|
|
properties:
|
|
|
|
detected:
|
|
|
|
type: string
|
|
|
|
engine:
|
|
|
|
type: string
|
|
|
|
source_language:
|
|
|
|
type: string
|
|
|
|
target_language:
|
|
|
|
type: string
|
|
|
|
translated-text:
|
|
|
|
type: string
|
|
|
|
type: object
|
2023-09-11 09:15:41 +05:30
|
|
|
libmozhi.List:
|
2023-08-27 21:53:49 +05:30
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
info:
|
|
|
|
contact: {}
|
|
|
|
paths:
|
2023-10-25 18:39:31 +05:30
|
|
|
/api/engines:
|
|
|
|
get:
|
|
|
|
description: Lists available Engines.
|
|
|
|
responses:
|
|
|
|
"200":
|
|
|
|
description: OK
|
|
|
|
schema:
|
|
|
|
additionalProperties:
|
|
|
|
type: string
|
|
|
|
type: object
|
|
|
|
summary: List engines
|
2023-08-27 21:53:49 +05:30
|
|
|
/api/source_languages:
|
|
|
|
get:
|
|
|
|
parameters:
|
|
|
|
- description: Engine name
|
|
|
|
in: query
|
|
|
|
name: engine
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"200":
|
2023-09-11 09:15:41 +05:30
|
|
|
description: OK
|
2023-08-27 21:53:49 +05:30
|
|
|
schema:
|
2023-09-11 09:15:41 +05:30
|
|
|
$ref: '#/definitions/libmozhi.List'
|
2023-08-27 21:53:49 +05:30
|
|
|
summary: Show list of available source languages for engine
|
|
|
|
/api/target_languages:
|
|
|
|
get:
|
|
|
|
parameters:
|
|
|
|
- description: Engine name
|
|
|
|
in: query
|
|
|
|
name: engine
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"200":
|
2023-09-11 09:15:41 +05:30
|
|
|
description: OK
|
2023-08-27 21:53:49 +05:30
|
|
|
schema:
|
2023-09-11 09:15:41 +05:30
|
|
|
$ref: '#/definitions/libmozhi.List'
|
2023-08-27 21:53:49 +05:30
|
|
|
summary: Show list of available target languages for engine
|
|
|
|
/api/translate:
|
|
|
|
get:
|
2023-09-09 20:03:14 +05:30
|
|
|
description: When engine is set to all, it will return an array of libmozhi.LangOut.
|
2023-08-27 21:53:49 +05:30
|
|
|
parameters:
|
|
|
|
- description: Engine name
|
|
|
|
in: query
|
|
|
|
name: engine
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Source language
|
|
|
|
in: query
|
|
|
|
name: from
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Target language
|
|
|
|
in: query
|
|
|
|
name: to
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Text being translated
|
|
|
|
in: query
|
|
|
|
name: text
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
"200":
|
2023-09-11 09:15:41 +05:30
|
|
|
description: OK
|
2023-08-27 21:53:49 +05:30
|
|
|
schema:
|
2023-09-11 09:15:41 +05:30
|
|
|
$ref: '#/definitions/libmozhi.LangOut'
|
2023-08-27 21:53:49 +05:30
|
|
|
summary: Translate text
|
|
|
|
/api/tts:
|
|
|
|
get:
|
|
|
|
parameters:
|
|
|
|
- description: Engine name
|
|
|
|
in: query
|
|
|
|
name: engine
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Language being TTS'd
|
|
|
|
in: query
|
|
|
|
name: lang
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
- description: Text being TTS'd
|
|
|
|
in: query
|
|
|
|
name: text
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
responses: {}
|
|
|
|
summary: Get Text-To-Speech for specified language using specified engine
|
|
|
|
swagger: "2.0"
|