mirror of
https://codeberg.org/aryak/mozhi
synced 2024-11-16 18:13:02 +05:30
104 lines
2.3 KiB
YAML
104 lines
2.3 KiB
YAML
definitions:
|
|
libmozhi.LangOut:
|
|
properties:
|
|
detected:
|
|
type: string
|
|
engine:
|
|
type: string
|
|
source_language:
|
|
type: string
|
|
target_language:
|
|
type: string
|
|
translated-text:
|
|
type: string
|
|
type: object
|
|
libmozhi.List:
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
paths:
|
|
/api/source_languages:
|
|
get:
|
|
parameters:
|
|
- description: Engine name
|
|
in: query
|
|
name: engine
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/libmozhi.List'
|
|
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":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/libmozhi.List'
|
|
summary: Show list of available target languages for engine
|
|
/api/translate:
|
|
get:
|
|
description: When engine is set to all, it will return an array of libmozhi.LangOut.
|
|
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":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/libmozhi.LangOut'
|
|
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"
|