Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add a line to the plist using NPCEditor

The first step to make Brad or Rachel say something new is adding the line to the .plist file that NPCEditor uses to store its data.

  1. Launch NPCEditor using the VHTK Launcher:
    1. Hit Advanced.
    2. Click on the green arrow in the NPCEditor line in the Agents section.
    3. Note that the NPCEditor will launch minimized and may be grouped with other Java processes.
  2. In the NPCEditor, select the Utterances tab. On the right side , hit in the Answers column, click the "Add" button. A new blank line will be created in the plist, generally at the bottom of the plistlist.
    1. Note that once you make changes, you will be prompted to save the .plist file. It is best to save under a new name. You can disable automatic saving in the Edit menu, Properties.
  3. Type the dialog you want Brad to say in the text box at the bottom.
    1. Image Added
    2. Note that you may need to adjust the GUI to see the
    text box. You can also
    1. correct text field; it's the one right below the buttons. You can ignore the Script section for now.
    2. Note that while you can paste in text,
    but
    1. you need to make sure it doesn't contain any special punctuation marks, such as those found in MS Word or Excel. Typed in punctuation should be fine.
  4. Fill in the External ID line at the top. This .
    1. If using prerecorded speech, this should be the audio file name
    of the audio file for the line
    1. without the extension (i.e. test
    _line
    1. , not test
    _line
    1. .wav)
    , if using prerecorded speech, or a name that will help keep things organized if using TTS.
    1. .
    2. All External ID's should be unique. 
  5. Fill in the other information.: - Ensure the Domain :
    1. 'Domain' is '
    brad smith
    1. General' or whatever domain you want the line to appear in.
    2. 'Toss' is used for jumping between domains and can be ignored for now.
    : -
    1. 'Type' can be blank or one of the control types.
    : -
    1. 'Speaker' should be
    "brad"
    1. 'Brad' or your character
    and must be set to something for playback
    1. 's name.
    : -
    1. 'Addressee' should be
    "user": -
    1. 'User'
    2. 'Topic' is not required, but useful for organization.
    : -
    1. 'Sound' is used to sort between prerecorded or
    text to speech
    1. TTS lines, set accordingly.
  6. If you are using TTS, Brad will speak You may test the line when you double click by double-clicking on it in NCPEditorthe Answers list, provided the rest of the Toolkit is running.

Set the sound path and voice in SmartBody

By default, the Smart Body sequence files for the VH Toolkit include references to two voices, a prerecorded voice and a Text to Speech voice.

From \trunk\data\sbm-toolkit\scripts\init-unity-basiclevel-brad.seq

Line 8

An audio path is set in Smart Body:

Panel

0 path audio sounds

Line 35

The voices are set:

Panel

1 set character brad voice audiofile .
1 set character brad voicebackup remote BradVoice

Brad will search for a prerecorded sound file in the path defined by the path audio command above, then roll over to the TTS voice using the TTS relay. The sound file is sought by name, based on the External ID specified for the line in the plist.

Add a sound file

Sound files are stored in /data/sounds by default. Brad will look there first for a file to playback before using Text to Speech. Sound files used in the VHTK are 44.1khz, 16bit, mono PCM WAV files. Other sample rates and bit depths will work, as well as other formats, but not consistently across the renderers shipped with the Toolkit.

To have Brad speak your recorded line, simply add a file of the type described to the sound path with a file name that matches the External ID field you specified in the plist. For example, to have Brad speak a line with the External ID "test_utterance", there should be a file test_utterance.wav in /data/sounds.

Add basic lip synching

To get simple lip synching (just opening and closing the mouth):

...

Add a sound file

If you are using prerecorded speech, you need to place the audio file in the correct folder.

When using Unity, the audio files are kept in \Assets\StreamingAssets\Sounds under each Unity project. Any audio file that Unity can play back can be used. The file name needs to match the External ID used in NPCEditor (see above).

If the audio file cannot be found, the system will try to generate the audio using TTS.

Add lip synching

To generate lip-syncing for the audio file:

  • Add the line of text to 00_bradmasterlines.txt in \Assets\StreamingAssets\Sounds
  • Run 00_splitmasterlines.bat in the same directory
  • Run 00_runvisemeschedulersoxrunvisemeschedulersphinx4.bat in the same directory

See VisemeSchedulerSphinx4 for more details on this tool.

VHBuilder and Character Customizer

To quickly get started in generating dialog and behavior for new characters, please see the documentation on the VHBuilder and Character Customizer tools. These tools can generate simple dialog without needing to use NPCEditor. The introduction movie on the main VHToolkit page as well as some of the Tutorial Videos shows these tools.