127 Tts& operator=(
const Tts&) =
delete;
128 ErrorCode I2cWrite(
const uint8_t* data,
const uint8_t length);
131 TwoWire& wire_ = Wire;
static constexpr uint8_t kMaxTextBytesSize
文本数据最大字节数
定义 tts.h:24
ErrorCode PlayFromCache(const TextEncodingType text_encoding_type=kUtf8, uint8_t count=kMinSpeechCount)
从缓存块0的文本开始转语音并播放
static constexpr uint8_t kMaxCacheIndex
缓存块索引最大值
定义 tts.h:29
static constexpr uint8_t kMinSpeechCount
从缓存合成播放次数的最小值
定义 tts.h:34
static constexpr uint8_t kMaxSpeechCount
从缓存合成播放次数的最大值
定义 tts.h:39
ErrorCode Play(const String &text, const TextEncodingType text_encoding_type=kUtf8)
文本转语音并播放
ErrorCode PushTextToCache(const String &text, const uint8_t cache_index)
将文本内容上传到指定缓存块
Tts(const uint8_t i2c_address=kDefaultI2cAddress, TwoWire &wire=Wire)
构造函数
@ kI2cOtherError
定义 tts.h:50
@ kI2cDataTooLongToFitInTransmitBuffer
定义 tts.h:47
@ kI2cReceivedNackOnTransmitOfAddress
定义 tts.h:48
@ kI2cReceivedNackOnTransmitOfData
定义 tts.h:49
@ kUnknownError
定义 tts.h:53
@ kInvalidParameter
定义 tts.h:52
ErrorCode Initialize()
初始化函数
static constexpr uint8_t kDefaultI2cAddress
语音合成模块默认I2C地址
定义 tts.h:19
TextEncodingType
文本编码类型
定义 tts.h:60