We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

VoiceXML Prompt recording/saving issue.

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
cafeajit
Posts: 1
Joined: Tue Mar 13, 2007 9:25 am

VoiceXML Prompt recording/saving issue.

Post by cafeajit »

We encountered a strange issue with respect to recording and saving prompts in a wav format through plum platform. I'm using Java/JSP for the serverside processing.
The prompt is recorded and saved with no problems when I run my Java code in Windows platform.

But when I run my Java code on the Linux server, what all I hear of the recorded prompt is noise.

I'm not quite sure what is the issue here ... is it plum-server/java/OS. And I need to make this work on Linux because Linux OS is our production environment.

If you guys can give me any feedback on this is issue, that'd be great.

Here are the details of the code.

VoiceXml Code:
<voicetag:formStart id="record_message"/>
<record beep="true" name="recorded_message" type="audio/x-wav" maxtime="30s" dtmfterm="true">
<voicetag:prompt id="<%=BEGIN_RECORDING%>"/>
<noinput>
<voicetag:log dialog="record_message" event="noinput" flushBuffer="false"/>
<voicetag:prompt id="<%=NOTHING_RECORDED%>"/>
</noinput>
<filled>
<voicetag:log dialog="record_message" event="" flushBuffer="false"/>
<voicetag:prompt id="<%=YOU_RECORDED%>"/>
<value expr="recorded_message"/>
<assign name="newMessage" expr="recorded_message"/>
<goto next="#record_prompt_confirm"/>
</filled>
</record>
<voicetag:formEnd/>

Java Server Code:

promptData=getField(items,"newMessage");

try {
OutputStream writer = new BufferedOutputStream(new FileOutputStream(path+promptId+".wav"));
byte[] bytes = promptData.getBytes();
writer.write(bytes);
writer.close();
} catch (Exception e) {
throw new PromptMaintenanceException("Problem writing prompt data to file");
}

private String getField(List items,String fieldName)
{
for (Iterator it = items.iterator(); it.hasNext())
{
FileItem item = (FileItem) it.next();
if (item.getFieldName().equals(fieldName))
return item.getString();
}
return null;
}


Thanks,

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code looks fine- must be server-side problem

Post by support »

Hi,

IVR developers guess that it's an IVR server-side problem (Java versioning/compatibility) since you're manipulating raw data streams on the far-end. Your VXML code looks fine.


Regards,

Plum Support

Post Reply