#1. 准备 需保证环境中有如下lib库
sudo aid-pkg update
sudo aid-pkg install aidlite-qnn248

apt-get install libasound2-dev

#2. 例子目录 例子目录默认在 [/usr/local/share/aidvoice/examples/] 推荐将其拷贝到您自己的工作目录
mkdir -p /home/aidlux/your_work_dir/ && cp -r /usr/local/share/aidvoice/examples/ /home/aidlux/your_work_dir/
cd /home/aidlux/your_work_dir/examples/aidvoice/tts/cpp/

#3. 编译运行 (如果不想将其拷贝到自己的工作目录 以下命令需要添加 suduo 权限)
mkdir build && cd build
cmake.. && make

#4. 运行 (-m 具体模型路径 -r 运行模式 stream|nostream, 不传 -r 默认 nostream)
#若要播放合成的音频 下面命令需要加上sudo
#查询当前麦克风设备id
sudo ./test_tts -c
#整段合成 (nostream)
sudo ./test_tts -m "model_path" -r nostream -i "microphone_id"
#分片流式合成 (stream)
sudo ./test_tts -m "model_path" -r stream -i "microphone_id"
#读取文件
sudo ./test_tts_file -m "model_path" -i "microphone_id" -f "file_path"


