Step4: Creating Dialog System¶
Let’s create a simple dialog system by combining speech recognition component and the dialog manager component.
Preparation¶
- Preparation of the speech recognition components
We have to provide a speech recognition grammar to run the speech recognition component.
Create the following text data.
sample-en.xml
<?xml version="1.0" encoding="UTF-8" ?> <grammar xmlns="http://www.w3.org/2001/06/grammar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd" xml:lang="en" version="1.0" mode="voice" root="command"> <rule id="command"> <one-of> <item>hello</item> <item>bye</item> </one-of> </rule> </grammar>
- Dialog Manager component preparation
Create the following text data.
sample-en.seatml
<?xml version="1.0" encoding="UTF-8"?> <seatml> <general name="sample"> <agent name="speechin" type="rtcin" datatype="TimedString" /> <agent name="speechout" type="rtcout" datatype="TimedString" /> </general> <state name="OPEN"> <rule> <key>hello</key> <command host="speechout">hello</command> </rule> <rule> <key>bye</key> <command host="speechout">bye bye</command> </rule> </state> </seatml>
- Prepare the setting file rtc.conf
You may copy the setting used in Step2: Basic Usage of RT-SystemEditor and Testing Audio Components.
Test procedures¶
- Start the SEAT and Julius components.
$ juliusrtc sample-en.xml$ seat sample-en.seatmlMake sure the component is displayed in Eclipse name service view.
- Drag and drop SEAT and Julius components to the editor panel.
- Connect between the components.
- Remove the link between ConsoleIn component and Festival component.
- Create a link between AudioInput output port and Julius input port.
- Create a link between Julius “result” output port and SEAT input port.
- Create a link between SEAT output port and Festival input port.
Make sure that everything is connected!
- Activate and verify the behavior.
Press “All Activate” button.
Check to receive the response by speaking “Hello” or “Goodbye” in front of the microphone.
Note
If it does not work:
Check the following points.
- Check environmental noises
- Check whether you have the background or ambient noise. If you want to recognize the noisy environments, consider using headset microphone or directional microphones.
- Adjust audio input volume
- Speech recognition will show low performance when the audio volume is too large or too small (if you see the warnings such as “Warning: strip to...” in the terminal where you have launched julius component, audio volume may not appropriate). Adjust size of volume by looking at the volume meter.
Proceed to Step5: Extending the Dialog System.