语音合成模块

../../../../_images/%E8%AF%AD%E9%9F%B3%E5%90%88%E6%88%90%E4%BC%A0%E6%84%9F%E5%99%A8.png

概述

用于进行离线语音合成,将文字进行语音播放,带腔体式喇叭。

技术参数

工作电压: VCC 3.3V -5V

模块尺寸:24*48mm

固定安装:2个兼容塑料积木通孔

通讯方式:串口,波特率9600

输出:语音合成结果

引脚定义

引脚

定义

GND

地

VCC

电源

TX

串口发送

RX

串口接收

示例程序

图形化代码

from mpython import *

from bluebit import SpeechSynthesis

speech_synthesis = SpeechSynthesis(uart_num=1,pin_tx=Pin.P16,pin_rx=Pin.P15)
speech_synthesis.play('行路难(其一)【唐】 李白 金樽清酒斗十千,玉盘珍羞直万钱。停杯投箸不能
# note: truncated at right edge of screenshot; tail of last code line not recoverable
speech_synthesis.release()
../../../../_images/%E8%AF%AD%E9%9F%B3%E5%90%88%E6%88%90.png