Up:Tutorial?     Previous:Samples/Communication between agents?     Next:Samples/Operation on visual?

Speech recognition

This section explains how to perform speech recognition in SIGVerse.

※ NII server will work properly with version 101104 or later of SIGVerse. Also, in order to perform speech recognition, you must specify the location of the dictation-kit and of the speech recognition software Julius during the installation of the SIGVerse. How to do it here?

Speech recognition of voice data (wave files)

Here you will learn how to recognize the voice of audio data samples (wave files) that are prepared in advance.

Create controller

Let's create a controller of the agent that receives the audio data to perform speech recognition.

$ cd ~/sigverse-<version>/bin/NewWorld
$ emacs soundRecog.cpp

soundRecog.cpp

Here is an example of how to display the results of speech recognition.

Compile

Modify the Makefile.

$ emacs Makefile

Specify the soundRecog.so as the object file.

# Specify the object file
OBJS     = soundRecog.so

And then compile it.

$ make

World file creation

$ cd ..
$ emacs xml/soundRecog.xml

soundRecog.xml

You're ready to roll.

Start of SIGVerse and Julius

Start SIGVerse first.

$ ./sigserver.sh -p 9001 -w soundRecog.xml &

Start Julius next.

$ ./sigjsp.sh -p 9001

This starts the shell script named Julius sigjsp.sh. It tells the simulation server to start Julius, with the -p option specifying the port number of the server running the simulation.

Julius has been successfully started If you see a message like the following. If you do not start properly, please refer to the Julius setup.

Stat: adin_tcpip: waiting connection...
===================================
  julius adinnet port connect ok!
Stat: server-client: connect from 127.0.0.1
Stat: adin_tcpip: connected
===================================
***************************************
***   julius successfully started   ***
***************************************
*******************************************************
  connect to SimServer (localhost:9111) ok
*******************************************************
clerkName (socio.iir.nii.ac.jp)
send COMM_REQUEST_PROVIDE_SERVICE ok
waiting for connection ... (accept sock: 7)
[SYS]  socio.iir.nii.ac.jp:7500  : service provider
[SYS]  127.0.0.1 connected

Transmission of voice data from SIGViewer

When Julius has been started in SIGVerse, start the SIGViewer on the client side, and connect to the server. When the connection is complete, you will see a standing robotic agent.

To start the simulation, in the SIM_STRL_CMD, choose START in the list, then press the "send" button. Next, click the Command tab in the upper right corner. The top entry field lets you select a voice and general. Here you select the voice. Click on the robotic agent Click the button "Choose to be transmitted" then. Click the "Send Voice" button.

sound_1.jpg

A dialog box is displayed to select the audio data to be sent, where you have installed the SIGViewer, by default

C:\Program Files\SIGViewer_<version>\SIGViewer\release

Select the sample.wav in, and sends the audio data. The following message appears then, I think that speech recognition results to be displayed "Please reference poverty."

connection accepted. (sock=8)
waiting for connection ... (accept sock: 7)
connection accepted. (sock=8)

waiting for connection ... (accept sock: 7)
[MSG]  robot_000(127.0.0.1) channel = 0
[MSG]  robot_000(127.0.0.1) sampling rate = 0
[MSG]  robot_000(127.0.0.1) endian : little
[MSG]  robot_000(127.0.0.1) text : 貧乏参考ください。

So that said "Please three individual apple" and I have heard the view (sample.wav) audio data, it has been recognized a little wrong you know.

※ Please note that there is only Tsuzu Julius will start even if you exit the SIGVerse. You can see the process running the following command.

$ ps aux | grep <username>

Julius setup

SIGVerse Communication is performed using the module mode of Julius. Also, use the audio input port over the network to provide voice and data Julius that adinnet. Julius If the port number for communication simulation Julius and server has been duplicated with other users may not boot properly. This section describes how to configure these port numbers.

Julius server settings

Copy the home directory of your own dictation kit. (Or you have downloaded from the site.)

$ cp -r /usr/local/share/dictation-kit-v4.0 ~/

Already has a configuration file that is configured for SIGVerse Julius in the directory and then copy. Modify the configuration file.

Please replace if you download the configuration file here.

$ emacs ~/dictation-kit-v4.0/fast.jconf

Set the port number the server module mode, adinnet here. Modify the following two points.

  • The port number of the server module mode
######################################################################
#### Server module mode
######################################################################
-Module module starting with the # server mode

   ↓

######################################################################
#### Server module mode
######################################################################
-Module module boot server mode # 10511
  • adinnet port number
######################################################################
#### Audio input source
######################################################################
## Please select one (default: mfcfile)

(Optional)
 -input adinnet

   ↓

######################################################################
#### Audio input source
######################################################################
## Please select one (default: mfcfile)

(Optional)
-input adinnet 
-adport 10522

10511 Here, we have the module number and port number 10522 adinnet port. It is recommended that you change the number difficult to duplicate with other users.

Setting up the simulation server

Sets the simulation server then. Simulation server reads the configuration file on startup following Julius. Let's see.

$ emacs /home/<usrname>/sigverse-<version>/share/sigverse/etc/sigjsp.conf

The default is as follows.

# ************************************************************
#  sigjsp configuration file
# ************************************************************

# ======================================================
#  SimServer hostname and port number
# ======================================================
SERVER=localhost
PORT=7000 


# ======================================================
#  Port number that sigjsp waiting for connection
# ======================================================
SERVICE_PORT=7500 
 

# ======================================================
#  julius port number
# ======================================================
JULIUS_MODULE_PORT=10500
JULIUS_ADINNET_PORT=5530 
 

# ======================================================
#  julius path (not directory, path to executable)
# ======================================================
JULIUS_PATH=/usr/local/bin/julius

# ======================================================
#  julius config file
#
#  [remark]
#  when relative path is specified, actual path is
#  calculated from current directory.
#  (ex)
#  JULIUS_CONFIG_FILE=fast.jconf
#  $ pwd
#  /home/somebody
#  $ sigjsp
#  ---> sigjsp searches for /home/somebody/fast.jconf
# ======================================================
JULIUS_CONFIG_FILE=/usr/local/share/dictation-kit-v4.0/fast.jconf   


# ======================================================
#  some wait time to finish starting julius (in msec)
# ======================================================
# DELAY_TIME_FOR_START_JULIUS=3000

Here you can set the following.

  • The port number of the simulation server (default 7000)
  • Julius service provider's port number (default 7500)
  • Julius port number of the module (default 10500)
  • Julius adinnet port number (default 5530)
  • Julius location of the executable file of
  • Julius location of the configuration file

These port numbers are set to the value of the default port number is set by Julius. Change the port number that has been previously set these values.

JULIUS_MODULE_PORT=10500
JULIUS_ADINNET_PORT=5530 

    ↓

JULIUS_MODULE_PORT=10511
JULIUS_ADINNET_PORT=10522 

Change the number Julius difficult to duplicate the port number of the next service provider.

SERVICE_PORT=7500 

    ↓

SERVICE_PORT=10533

Change the location of the configuration file then Julius.

JULIUS_CONFIG_FILE=/usr/local/share/dictation-kit-v4.0/fast.jconf

    ↓

JULIUS_CONFIG_FILE=/home/<username>/dictation-kit-v4.0/fast.jconf

In addition, these port numbers and configuration files can also be specified when the execution of the sigjsp.sh. Will be the value specified in the configuration file above if you do not specify anything.

        % sigjsp.sh [-p <number>] [-sp <number>] [-mp <number>] [-ap <number>] [-e <path>] [-C <config.jconf>]
OPTION :
	-p <number>  : port number of the simulation server
	-sp <number> : Julius port number of service providers
	-mp <number> : Julius module mode port number
	-ap <number> : adinnet port number
	-e <path>	   : the location of the Julius (default: / usr / local / bin / julius)
	-C <config.jconf;> : Julius location of the configuration file

Setup is now complete. Please make sure that Julius starts successfully.

If the result of speech recognition would have been displayed as (null)

Please try and run the file add the following line to your configuration fast.jconf of Julius.

-charconv EUC-JP UTF-8

Speech recognition of voice data (input from the microphone)

This section describes how to speech recognition in SIGVerse audio data recorded on the microphone next.

※ It is assumed that the microphone is connected to the client pc.

Edit controller

Edit the controller soundRecog.cpp you just created.

$ cd ~/sigverse-<version>/bin/NewWorld
$ emacs soundRecog.cpp

And add the following code under the. (Speech recognition can also be done without it)

Raise one's hand is that if the recognition result of "Hello" This was obtained.

Let's compile and run So.

$ make

Recognition of the recorded audio data

Start the simulation server.

$ ./sigserver.sh -p 9001 -w soundRecog.xml &

Start Julius.

$ ./sigjsp.sh -p 9001

Connect to the server to start the SIGViewer, start the simulation, as shown above, click Select, the voice the comm tab in the upper right corner, specify the subject sent next. To start recording, click the "Rec Start" button and.

sound_2.jpg

Please try talking with "Hello" into the microphone. When you finish recording, click the "Rec End" button. Audio data is normally recorded at the lower left of SIGViewer "appears and captured voice save to (Capture.wav) at this time.

sound_3.jpg

Select the Capture.wav was recorded just click the "Send Voice" button. Has been created in the same location as the sample file is Capture.wav sample.wav of earlier.

I think if the robot raises his hand and speech recognition, "Hello". Please try to give a hand robot challenge.

Up:Tutorial?     Previous:Samples/Communication between agents?     Next:Samples/Operation on visual?


Attach file: filesound_3.jpg 1622 download [Information] filesound_2.jpg 1597 download [Information] filefast.jconf 1545 download [Information] filesound_1.jpg 1533 download [Information] filemakefile_sound 1492 download [Information]

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2013-11-29 (Fri) 23:14:14 (3799d)