This article is just to introduce the whole process of making AAC audio files. It is only for reference. If you have a better method, you don’t need to use this method.
-
1. Search in the WeChat applet
语音朗读助手
and click to open
-
2. After opening the applet, click
输入文件或链接
to enter the text you want to convert into speech into the text box, and you can also set声音
,语速
and音调
, after configuration, click开始朗读
to convert text to speech.
-
3. Click to play
播放按钮
whether the generated voice meets your requirements. If the audio is suitable, click下载按钮
. At this time, the download link of the audio will be copied.
-
4. Copy the copy from step 3
音频下载链接
and paste it into浏览器
the input box. After pressing Enter, an audio playback dialog box will pop up. Click the three dots on the right to download the mp3 audio you need to your computer or mobile phone.
-
5. Drag the downloaded mp3 file into the format factory (if you have not downloaded the format factory, please download it from the Internet), select Convert to
AAC格式
, and click确认
.
-
6. Select audio, click the setting button, enter the audio setting, configure the sampling rate as 44100, and click OK.
-
7. After the conversion is successful, an audio file ending in aac will be generated. At this time, the file you need has been converted into an audio file that can be used in our subsequent development.
-
8. Here take hiopenais as an example. If you want to use hiopenais to play audio, please copy the aac file generated in step 6 (modify the file name according to your needs) to the Ubuntu directory. Of course, you can also specify it as
code\hiopenais\sdk\hi3516dv300\osdrv\pub\rootfs_glibc\hiopenais\audio
rootfs_glibc other directories.
-
9. If you want to play the audio converted by yourself, please modify the content in the function of the file
code\hiopenais\dependency\audio
in the directory , and change the corresponding path to the absolute path where you store the audio. The entry function of audio playback is case 2 of the audio_test() function in audio_test.c, which is SAMPLE_AUDIO_AdecAo().audio_test.c
SAMPLE_AUDIO_OpenAdecFile()
-
10. The next step is to write the logic code, make the file system, burn the image to the development kit, and verify the specific functional phenomenon.