VoiceGuide IVR Software Main Page
Jump to content

Say Numbers

Recommended Posts

I see files vbs_5_SayNumber.vbs thru vbs_16_SayNumber.vbs for

Dialogic ports within the data subfolder.

 

I made few changes to TimeHHNN function not to pronounce Zero Zero

on even hour, but VG ignores it how can I make it consider my changes.

 

 

if left(sNN, 1) = "0" Then

if Right(sNN, 1) = "0" Then

sNN_WavList = tens2wav(sHH) & "," & ".wav"& sAMPM

Exit Function

Else

sNN_WavList = "0.wav," & Right(sNN, 1) & ".wav"

end if

Else

sNN_WavList = tens2wav(sNN)

end if

 

TimeHHNN = tens2wav(sHH) & "," & sNN_WavList & "," & sAMPM

Share this post


Link to post

Please try changing the TimeHHNN function entry in lib_num2wav.vbs file to:

######
'name : Time am/pm - HHNN
'info : Say the hour and minute in am/pm format
'arg1 : Time in format HHNN or HH:NN
'######
Function TimeHHNN(ByVal arg1)
arg1 = replace(arg1, ":", "")
If Len(arg1) < 4 Then
  Exit Function
End If

sHH = Left(arg1,2)
sNN = Right(arg1,2)

If sHH >= 12 Then
  sHH = sHH - 12
  if sHH = 0 then
    sHH = "12"
  end if
  if sHH < 10 then
    sHH = "0" & sHH
  end if
  sAMPM = "pm.wav"
Else
  sAMPM = "am.wav"
end if    

if left(sHH, 1) = "0" Then
  sHH_WavList = Right(sHH, 1) & ".wav"
Else
  sHH_WavList = tens2wav(sHH)  
end if

if left(sNN, 1) = "0" Then
  if Right(sNN, 1) = "0" then
    'do not play anything for minutes,
    sNN_WavList  = ""
  else
    sNN_WavList = "0.wav," & Right(sNN, 1) & ".wav"
  end if
Else
  sNN_WavList = tens2wav(sNN)  
end if    

if sNN_WavList <> "" then
  TimeHHNN = tens2wav(sHH) & "," & sNN_WavList & "," & sAMPM
else
  'could add an "o'clock" sound file here...
  TimeHHNN = tens2wav(sHH) & "," & sAMPM
end if

End Function

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×