VoiceXML Forum Community Message Board


Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» VoiceXML Forum Community Message Board   » Newbies   » Is it possible to do this?

 - UBBFriend: Email this page to someone!    
Author Topic: Is it possible to do this?
marspark
Junior Member
Member # 3252

Rate Member
Icon 1 posted March 15, 2006 10:45 PM      Profile for marspark   Email marspark   Send New Private Message       Edit/Delete Post   Reply With Quote 
By input a pre-recorded voice file, say WAV. and has voicexml code to check if the file containes a certain keyword, say "MARY".

For example, the pre-recorded voice is: "Hi mary" then after going through the code, it'll return "mary"

To be more specific, this is what I want to achieve,
1. i want to record a sound file and send to web server that runs weblogic
2. if i can, i want to extract infomation (i.e keywords) from this voice file with the help from voicexml.

[ March 16, 2006, 12:45 AM: Message edited by: marspark ]

Posts: 4 | Registered: Sep 2005  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted March 16, 2006 01:02 PM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
If you�re thinking about using VoiceXML to scan the content of the audio file and do keyword matching, you�re probably going to be disappointed. VoiceXML is a markup language for creating voice dialogs and can�t perform that kind of function (at least not on its own).

However, if you mean that you are trying to obtain data from an audio file that the caller records through your application, there may be a couple of options that could help.

First, if you know the name of the audio file, and if the name has some meaning, you can extract it using some simple JavaScript.
code:
<?xml version = "1.0"?>
<vxml version = "2.0">
<var name="wavFile" expr="'Joshua.wav'"/>
<script>
function getName(a) {

var b = a.length;
var c = a.substr(-1,(b-4));
return c;

}
</script>
<block><prompt>
Hello there, <value expr="getName(wavFile)"/>.
</prompt></block>
</vxml>

It may also be possible for you to simultaneously perform a recognition against a grammar, and capture a voice recording. So if you wanted the caller to say their name, and record what they say, and then use information about what they said (i.e., the recognition returned by the ASR engine), you could do the following:
code:
<?xml version = "1.0"?>
<vxml version = "2.0">
<property name="recordutterance" expr="true"/>
<var name="iHeard" expr="''"/>
<var name="youSaid" expr="''"/>

<form id="F_1">
<field name="getName">
<grammar type="application/srgs+xml" src="names.grxml"/>

<prompt>Say your name.</prompt>
<nomatch>Sorry, I didn't recognize your name.</nomatch>
<noinput>Sorry, I didn't hear you.</noinput>

<filled>
<assign name="iHeard" expr="getName"/>
<assign name="youSaid" expr="application.lastresult$.recording"/>
<data method="post" src="captureData.php" namelist="getName theySaid" enctype="multipart/form-data"/>
<goto next="#F_2"/>
</filled>
</field>
</form>

<form id="F_2">
<block>
<prompt>Hello, <value expr="iHeard"/>. This is what you said, <value expr="youSaid"/>.</prompt>
</block>
</form>

</vxml>

By doing this, you would know what the caller said � because you have a successful grammar match � and you would also have a recording of their utterance.

Bear in mind that you would need to utilize a platform that supports the proposed 2.1 specification. Also, since this change to the VoiceXML spec isn�t final, different vendors implementations may vary, so read their documentation carefully.

Hope this helps.

--------------------
Mark
VoiceinGov.org
http://www.voiceingov.org

Posts: 55 | Registered: Jun 2005  |  IP: Logged


All times are Eastern  
Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | VoiceXML Forum



Powered by Infopop Corporation
UBB.classicTM 6.3.1.2