2
0

demo.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <include>
  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>
  72. <!--
  73. For Emacs:
  74. Local Variables:
  75. mode:xml
  76. indent-tabs-mode:nil
  77. tab-width:2
  78. c-basic-offset:2
  79. End:
  80. For VIM:
  81. vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
  82. -->