# capacitor-plugin-tts
**Repository Path**: mengqingnan/capacitor-plugin-tts
## Basic Information
- **Project Name**: capacitor-plugin-tts
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2021-09-17
- **Last Updated**: 2022-03-04
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# @mqn/capacitor-plugin-tts
Capacitor的Android平台TTS插件
## Install
```bash
npm install @mqn/capacitor-plugin-tts
npx cap sync
```
## API
* [`init(...)`](#init)
* [`speak(...)`](#speak)
* [Interfaces](#interfaces)
### init(...)
```typescript
init(options: InitOptions) => Promise
```
初始化
| Param | Type |
| ------------- | --------------------------------------------------- |
| **`options`** | InitOptions |
--------------------
### speak(...)
```typescript
speak(options: SpeakOptions) => Promise
```
合成语音
| Param | Type |
| ------------- | ----------------------------------------------------- |
| **`options`** | SpeakOptions |
--------------------
### Interfaces
#### InitOptions
初始化选项
| Prop | Type | Description |
| ------------ | ------------------- | ----------- |
| **`Engine`** | string | 语音引擎包名 |
#### SpeakOptions
语音合成选项
| Prop | Type | Description |
| --------------- | ----------------------------- | ----------- |
| **`Text`** | string | 语音文本 |
| **`Pitch`** | number | 音调 |
| **`Rate`** | number | 语音速率 |
| **`QueueMode`** | 'ADD' \| 'FLUSH' | 队列模式 |