4G_module/custom/local_tts/inc/local_tts.h

31 lines
835 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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);
// 发送本地TTS播放内容
// len=0时自动计算长度//interruptible =1时,表示允许被打断播放
int8_t local_tts_text_play(char *text, uint8_t len, uint8_t en_interruptible);
//获取播放状态
int local_tts_get_play_state(void);
#endif // __LOCAL_TTS_H__