demo.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <include><!--This line will be ignored it's here to validate the xml and is optional -->
  2. <macro name="msgcount">
  3. <input pattern="(.*)">
  4. <match>
  5. <action function="execute" data="sleep(1000)"/>
  6. <action function="play-file" data="voicemail/vm-you_have.wav"/>
  7. <action function="say" data="$1" method="pronounced" type="items"/>
  8. <action function="play-file" data="voicemail/vm-messages.wav"/>
  9. <!-- or -->
  10. <!--<action function="speak-text" data="Sie haben $1 Nachrichten"/>-->
  11. </match>
  12. </input>
  13. </macro>
  14. <macro name="saydate">
  15. <input pattern="(.*)">
  16. <match>
  17. <action function="say" data="$1" method="pronounced" type="current_date_time"/>
  18. </match>
  19. </input>
  20. </macro>
  21. <macro name="timespec">
  22. <input pattern="(.*)">
  23. <match>
  24. <action function="say" data="$1" method="pronounced" type="time_measurement"/>
  25. </match>
  26. </input>
  27. </macro>
  28. <macro name="ip-addr">
  29. <input pattern="(.*)">
  30. <match>
  31. <action function="say" data="$1" method="iterated" type="ip_address"/>
  32. <action function="say" data="$1" method="pronounced" type="ip_address"/>
  33. </match>
  34. </input>
  35. </macro>
  36. <macro name="spell">
  37. <input pattern="(.*)">
  38. <match>
  39. <action function="say" data="$1" method="pronounced" type="name_spelled"/>
  40. </match>
  41. </input>
  42. </macro>
  43. <macro name="spell-phonetic">
  44. <input pattern="(.*)">
  45. <match>
  46. <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
  47. </match>
  48. </input>
  49. </macro>
  50. <macro name="tts-timeleft">
  51. <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
  52. <!-- If the function "break" is encountered all parsing will cease -->
  53. <input pattern="(\d+):(\d+)">
  54. <match>
  55. <action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
  56. <action function="break"/>
  57. </match>
  58. <nomatch>
  59. <action function="speak-text" data="Die Eingabe war ungültig."/>
  60. </nomatch>
  61. </input>
  62. <input pattern="(\d+) min (\d+) sek">
  63. <match>
  64. <action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
  65. </match>
  66. <nomatch>
  67. <action function="speak-text" data="Die Eingabe war ungültig."/>
  68. </nomatch>
  69. </input>
  70. </macro>
  71. </include><!--This line will be ignored it's here to validate the xml and is optional -->