EN

STONE TOOL ( GUI design software ) Instructions and Cases of Voice Playing

Intelligent TFT LCD Module4.3 supports two kinds of audio file formats in WAV and MP3 with the expanded-names respectively of *. wav or *. mp3.

 

The audios in WAV format take up large spaces and the voices can be immediately output without deferral, which are suitable for the broadcasting situations with short time, such as accompanying sound with pressing keys and digital broadcasting etc. The files in WAV format must choose 22KHz and dual track data

 

The audios in MP3 format take up small spaces and the voices are shortly deferred for output (0.5s), which is suitable for the broadcasting situations with long time, such as start-up music, background music and voice prompt.

 

I Three Methods of Playing Voices

 

Table 1 Three Methods of Playing Voices of HMI of SDWe Series

Playing Methods

Descriptions

Playing of Register

Suitable for the playing of single voice with the ypical application voice prompt.

Playing of Extension Command 0x8503

Suitable for the playing of continuous multiple voices in item by item with the typical application digital broadcasting and background music.  

Playing of Accompanying Sound with Pressing Keys

Just as its name implies, suitable for the playing of prompt tone of pressing keys with the  typical application accompanying sound with pressing keys of s.

 

1.1 Playing of Register  

 

The user adds the voice files to the project through the Intelligent TFT LCD Module configuration software, and then writes the relevant register through the 0x80 command to control the voice playing and volume adjustment .

 

Table 2 Register of Voice Playing

Register Address

Definition

R/W

Byte Length

Description

0x50-0x52

Music_Set

W

1

0x5b:play voice

0x5c: stop playing

Music_Num

W

2

set value for music playing (0-4095)

0x53-0x54

Vol_Adj_En

W

1

0x5A means the application for the adjustment of the volume of playing music

Vol

W

1

Volume value with the scope of 0x00 to 0x40, default of turning on the power is 0x40

0x55

Vol_Status

R

1

Status of voice playing: 0x00: stop playing; 0x01: playing

 

1.2 Playing of Extended Command 0x8503

 

0x85 03 command plays appointed multiple voice files continuously. The command can be used for realizing the digital broadcasting of windows/counter (the audio file must be in WAV format) and can be used for the entertainment application (the audio file must be in MP3 format)

 

The effect of digital broadcasting can be heard in Attachment “Digital Broadcasting.m4a”.

 

Table 3 Extended Command 0x8503

Function

Instruction

Data

Description

Continuous Playing of Audio Files

0x85

03

+Mode

+NUM0+…+NUMn

03 means the continuous playing for the appointed command of multiple audio files;  

Mode Defines Playing Modes: 0 loop playing, 1 sequential playing, stop playing of others;  

NUM appoints the serial numbers of audio files (double bytes with the value range of 0x0000 to 0xFFFE ), if the audio files that do not exist are set, then it should be directly skip.  

In order to improve the playing effects, the formats of the audio files in the commands must be consistent. For example, all files are in WVA or MP3 format. WAV format must use 22KHz and dual track data, and the total size of the audio files in commands is less than 2M.  The total size of the audio files in MP3 format has no limit.  

 

1.3 Playing of Accompanying Sound with Pressing Keys  

 

Select voice playing files in the window of attribute settings when designing the touch control module.

 

The effect of accompanying sound with pressing keys can be heard in Attachment “Accompanying Sound with Pressing Keys.m4a”.

 

stone tool voice playing

Figure 1 Button Attribute Settings

 

II. Description of Case Projects

 

2.1 Realization of Accompanying Sound with Pressing Keys

After opening the attached voice case project, it can be seen that there are multiple voice files we have made in the audio list file, and there are two images in the icon list.

 

stone tool voice playing

Figure 2 List of Audio Files

 

It needs to select the audio files in the window of attribute settings when making the button. And the corresponding audio files can be automatically played by pressing the button which is made based on the above step.

stone tool voice playing

Figure 3 Button Attribute Settings  

 

2.2 Realization of Digital Broadcasting

 

The function of digital broadcasting can be realized by sending a series of voice files through 0x8503 command after adding the audio files in Figure 2.

 

For example, you can send the following command to realize the“please pay twelve thousand three hundred and forty-five yuan” in attachment“digital broadcasting.m4a”:

 

A55A198503   01   0018   0001 0012 0002 0011 0003 0010 0004 000F 0005 000E

Frame header of command sequential playing please pay one ten thousand two thousand three hundred four ten five yuan

 

III. Production of Audio File

 

3.1 Production of Audio File  

No matter which method is used to play the voice, the voice file must be firstly made. The voice file can be directly produced by the voice conversion software, that is, the voice file can be output correspondingly by inputting the corresponding texts needed in the software.

 

There are many tools used for generating voices and the following have introduced two useful tools, the is the Qiyi voice synthesis tool and the other is the text-to-voice broadcasting system tool. Figure 4 is the screenshot of the two tools, and the software is needed to set some parameters, including engine type, speaker, voice rate, volume, audio format, and audio encoding, etc., which can be selected as needed. Of course, there are also other voice generation tools that can be used, which have the same usages.

 

stone tool voice playing

Figure4 Voice Conversion Software  

 

1) The voice rate and volume can be selected as needed;

2) The text encoding and the text type directly use default setting;

3) There are commonly two kinds of audio formats in 8000 and 16000, and it is suggested to select 16000;

4) The audio encoding and the compression grade directly use the default setting, which can be adjusted as needed.

 

Take the generation of one voice file of playing “1” as an example. Input “1” in the input textbook and set the parameters in the right side. Then click “start to synthesize”, and the corresponding voice file can be generated.

 

stone tool voice playing

 

Figure 5 Example of Voice Production

 

3.2 Conversion of Format of Audio File  

 

Because the format of the audio file, which is produced by using the voice conversion software, is inconsistent with the requirements of HMI, there will light noise at the end of the voice when playing after downloading the file into the HMI. The format of the audio file can be converted to WAV format with 22KHz and dual-track by using the “format factory” software and the followings are the introductions for the conversion.

 

Start the “format factory” software, as shown in Figure 6, and click the “audio->WAV” in the left side to pop up the conversion window of the format of the audio file, as shown in Figure 7. Then click to add the file and select the audio files which are needed to convert.

 

stone tool voice playing

Figure 6 Format Factory

 

stone tool voice playing

Figure 7 Format Factory-Conversion of Audio Format

 

Then click the output set to pop up the setting window of the audio output format and set the sampling rate as 22020 and select the soundtrack of audio as 2. Then click “OK” to finish the setting, as shown in Figure 8.  The converted audio file is in 22KHz and dual-track, which can eliminate the noise at the end of the voice.

 

stone tool voice playing

Figure 8 Setting of Audio Output Format

 

The above instructions are the production procedures of the audio file and you are welcome to contact us for technical problems.

 

The following links may help you

 

14 STONE TOOL BOX instruction tutorial

https://www.stoneitech.com/news/instructions