Sound files for questions and responses
There are two things to do when you want to associate a sound file with a question or response: name the file and specify where you want the play buttons to be displayed relative to the question or response text. You can name the file in the metadata or routing section but the position of the button bar must be defined in the routing section.
In the metadata section
To name the file in the metadata section, follow the question or response text with:
labelstyle(Audio(Name = "<filename>"[, PlayControlPosition = "<position>"]))
where:
▪<filename> is the name or pathname of the sound (.wav) file relative to the Audio folder on the dialer, or a URL.
▪<position> specifies the position of the recording button bar relative to the question or response text if manual recording is required. It can be one of Top, Bottom, Left, or Right. The default is Left.
For example:
HeardAd "Please listen to this advertisement and tell me whether you recollect
hearing it during the last week.
INTERVIEWER: YOU CAN PLAY THE RECORDING MORE THAN ONCE."
labelstyle(Audio(Name = "catfood\catsnax.wav", PlayControlPosition = "Bottom"))
categorical [1..1]
{
Yes "Yes, I remember hearing it",
No "No, I have not heard it during the last week",
DK "I can't remember whether I heard it last week" dk
};
or:
HeardEver "And which of these adverts have you ever heard?
INTERVIEWER: PLAY EACH RECORDING AND SELECT THOSE HEARD."
categorical [1..]
{
MouseMorsels "Mouse Morsels"
labelstyle(Audio(Name = "catfood\mouse_morsels.wav", PlayControlPosition = "Right")),
Snax4Catz
labelstyle(Audio(Name = "catfood\snax4cats.wav", PlayControlPosition = "Right")),
KittyTreats "Kitty Treats"
labelstyle(Audio(Name = "catfood\kitty_treats.wav", PlayControlPosition = "Right")),
FishyNibbles "Fishy Nibbles"
labelstyle(Audio(Name = "catfood\fishy_nibbles.wav", PlayControlPosition = "Right"))
};
In the routing section
To name a sound file in the routing section, type:
<name>.Label.Style.Audio.Name = "<filename>"
for a question or
<name>.Categories["<response_name>"].Label.Style.Audio.Name = "<filename>"
where:
▪<name> is the question name.
▪<response_name> is the response name.
▪<filename> is the name or pathname of the sound (.wav) file relative to the Audio folder on the dialer, or a URL.
The play button toolbar is normally displayed to the left of the question or response text. To change this, type:
<name>.Label.Style.Audio.PlayControlPosition = ControlPositions.<position>
for a question or:
<name>.Categories["<response_name>"].Label.Style.Audio.PlayControlPosition = ControlPositions.<position>
where:
▪<name> is the question name.
▪<response_name> is the response name.
▪<position> is the control’s position relative to the question or response text and is one of cpTop, cpBottom, cpLeft, or cpRight. The default is cpLeft.
As an example, here’s the HeardEver question displayed using the default position for the play buttons.
Question with play button bar
File format and location
The dialer supports mono (single channel) .wav files in the following formats:
Sample rate | Sample encoding | Data rate | Comments |
---|
11025 Hz | 8 bits/sample, PCM | 38 MiB/h | Default file format |
8000 Hz | 16 bits/sample, PCM | 55 MiB/h | Better sound quality |
11025 Hz | 16 bits/sample, PCM | 76 MiB/h | Common file format |
In this table, PCM stands for Pulse Code Modulation; 1 MiB is 1024×1024 bytes.
If you have stereo (two-channel) sound files you can convert them to mono format with a program such as WavePad.
You must copy sound files into the dialer’s Audio folder manually. You can organize files by placing them in subfolders. The location of the Audio folder might vary between dialers so consult your dialer documentation for advice.
See also