2024-11-08 18:02:29 +08:00
|
|
|
|
#ifndef __LOCAL_TTS_H__
|
|
|
|
|
|
#define __LOCAL_TTS_H__
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
#include "cm_local_tts.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void local_tts_init(void);
|
|
|
|
|
|
|
|
|
|
|
|
// 静音 mute: 0-关闭 1-打开
|
|
|
|
|
|
void local_tts_mute(uint8_t mute);
|
|
|
|
|
|
|
|
|
|
|
|
// 音量设置 volume: 0-100
|
|
|
|
|
|
uint8_t local_tts_volume(uint8_t volume);
|
|
|
|
|
|
|
|
|
|
|
|
// speed: 语速,取值范围0-15,默认为5
|
|
|
|
|
|
// volume: 音量,取值范围0-15,默认为5
|
|
|
|
|
|
// mode: 0-自动模式 1-数字模式,2-数值模式
|
|
|
|
|
|
void local_tts_set(int32_t speed, int32_t volume, cm_local_tts_digit_e mode);
|
|
|
|
|
|
|
2024-11-25 22:16:49 +08:00
|
|
|
|
// 发送本地TTS播放内容
|
|
|
|
|
|
// len=0时自动计算长度//interruptible =1时,表示允许被打断播放
|
|
|
|
|
|
int8_t local_tts_text_play(char *text, uint8_t len, uint8_t en_interruptible);
|
2024-11-08 18:02:29 +08:00
|
|
|
|
|
2025-07-10 10:01:23 +08:00
|
|
|
|
//获取播放状态
|
|
|
|
|
|
int local_tts_get_play_state(void);
|
|
|
|
|
|
|
2024-11-08 18:02:29 +08:00
|
|
|
|
#endif // __LOCAL_TTS_H__
|