How can I make the dialogue application play a sound?

On the dialogue side, you need to send an output act that includes a representation of type AudioTrack. In this representation, you can either use the trackId or the uri attribute to specify the sound to be played. The first is the ID of a track in your library and is usually a bit faster in execution. The second specifies the URL of a local (file://…) or remote (http://…) audio file. You need to address the output act to a device that can play audio. This can be a speaker device provided by Audio Manager, e.g. the same device you use for the TTS.

If you want to use Audio Manager to play the sound, you need to ensure that its configuration includes a SoundLibraryConnector. Therefore, the XML config file needs to include a Connector section like the following:

<Devices xmlns:xsi=”” xsi:noNamespaceSchemaLocation=”AudioDevices.xsd”>
<Device id=”spk1″>
<Connector id=”tts” class=”DFKI.Automotive.Audio.TTS.DesktopTtsHandler”>
<Connector id=”snd” class=”DFKI.Automotive.Audio.SoundLibraryConnector“>

You may adjust the sound library directory (<dir>…</dir>) as necessary. You can then place uncompressed .WAV files into that directory or a subdirectory. You can use the file name (without extension) as the trackId in the AudioTrack representation (see above) to refer to a file.



Category: Speech / Audio
Tags: , ,

← How can I make the dialogue application play a sound?