VoiceXML Developer Series: A Tour Through VoiceXML, Part X
The OrderId field of the PizzaOrder table (shown below) is set as the primary key for the table. I've also included the OrderDateTime field, whose type is Date/Time so that we can track when orders were placed to make sure the store is getting orders out in the right order and on time.
Finally, we create the foreign key relationship between the Customers and PizzaOrder tables with the Relationships tool in Access. Drag the Phone field from the Customers table to the PizzaOrder table. This will popup the Edit Relationships window. Make sure that the Phone and CustomerPhone fields are selected for the relationship and check the Enforce Referential Integrity box, which will reject a new pizza order unless there is record with the same Phone number in the Customers table.
Now save the database and you're done.
Recording the voice prompts
Now that we've created the Access database, it's time to record the prompts. You can use any recording tool you want, but I would recommend Cool Edit 2000 for recording and editing your .wav file prompts. The waveform you see below was recorded in CoolEdit and is the welcome prompt that will be contained in main.vxml. The utterance I recorded was, "Thanks for calling Frank's Pizza Palace". The silence you see at the beginning of the waveform is where I intentionally waited for one second before speaking into the microphone.
While this one second sample doesn't contain any speech, it does contain the background noise generated by my computer. Highlight this sample and select Transform->Noise Reduction in the menu (shown below) and then click on the button labeled Get Profile From Selection and click OK.
This sets the pattern for background noise that we will filter out of the rest of the recording. Next, highlight the entire waveform and goto the Noise Reduction menu again. This time, just click on the OK button. This will automatically filter out the background noise for the whole waveform based upon the noise fingerprint you loaded from the silent sample. You'll notice that the waveform looks a little bit different and if you play the waveform, you'll notice that a lot of the noise that was originally in the sample has been removed.
The next thing we need to do is to adjust the amplitude of the sample. Select Transform->Amplitude->Amplify from the CoolEdit menu. In the menu on the right hand side (shown below), select 10dB Boost and click the OK button.
You'll notice that the waveform has higher peeks. When you play the new sample, it will be loud and crisp. The last thing we need to do is to remove the silence at the start and end of the sample. Highlight the silent portions of the waveform at the beginning and end and press the delete key. You will want to leave a very small break at the beginning and end, but not quite enough to be audible. Now you should have a waveform that looks like the one below.
Now, identify all of the prompts that need to be recorded using the dialog flow. Record and save the prompts using the techniques above. Be sure to speak clearly, but not too slow or fast. Try to maintain the same volume level and speaking rate as you record. If you need to, you can adjust the volume and speed in CoolEdit. When you play one waveform after another, it should almost sound like one recording because we will be combining these recordings for prompts. Another technique is to identify common phrases that will be used over and over again, such as "Is this correct". You can save time by recording once and reusing the waveform as many times as possible. Be sure that the inflection in your voice will be appropriate for the waveforms especially where we transition from one to another. For example, "Thanks for calling Frank's Pizza Palace". "May I take your order". When you play these two recordings together, it should sound natural.
Well, we've designed our database and learned how to record the prompts. In the next edition of the VoiceXML Developer, which is also the last article in the "Tour Through VoiceXML", we will conclude by developing the VoiceXML documents and ASP files using the database and prompts that we've recorded in this article.
About Jonathan Eisenzopf
Jonathan is a member of the Ferrum Group, LLC based in Reston, Virginia that specializes in Voice Web consulting and training. He has also written articles for other online and print publications including WebReference.com and WDVL.com. Feel free to send an email to firstname.lastname@example.org regarding questions or comments about the VoiceXML Developer series, or for more information about training and consulting services.
Page 2 of 2