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

28 lines
777 B
C
Raw 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播放
// en_break=1时使能打断播放 //timeout=0时表示播放忙时取消播放
int8_t local_tts_text_play(char *text, uint8_t len, uint8_t en_break, uint32_t timeout);
#endif // __LOCAL_TTS_H__