Plum DEV Documentation
voicexml:tags:lexicon

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
voicexml:tags:lexicon [2015/07/31 14:15]
admin [<lexicon>]
voicexml:tags:lexicon [2019/02/21 07:42] (current)
admin [Notes]
Line 2: Line 2:
 ======<​lexicon>​====== ======<​lexicon>​======
  
-Specifies a pronunciation lexicon for the prompt. This tag is not supported ​by Plum DEV.+Specifies a pronunciation lexicon for the prompt. This tag is only supported ​with the RealSpeak TTS engine.
 ====Attributes==== ====Attributes====
-| uri | This attribute is not supported. | +|uri  |The URI specifying the location of the dictionary file.| 
-| type | This attribute is not supported|+|type |not supported |
  
 ====Notes==== ====Notes====
  
-None+The dictionary file must always contain a SubHeader section that defines the contents of a Data section. These contents can either be expansions or pronunciations. 
 + 
 +In the example below, the first SubHeader and Data blocks define expansions, while the second Subheader And Data blocks define pronunciations. 
 + 
 +For pronunciations,​ you should follow the guidelines to the Phoneme Set for Nuance RealSpeak here: [[developer_reference:​tts|TTS Engine Characteristics]]. Please note that your web servers must be configured to associate the .dct extension with a mime-type of application/​edct-text-dictionary.
  
 ====Example==== ====Example====
Line 16: Line 20:
 <?xml version="​1.0"?>​ <?xml version="​1.0"?>​
 <vxml version="​2.0">​ <vxml version="​2.0">​
- +    ​<​form>​ 
-  ​<​form>​ +        <block
-    <field name="​userchoice"​+            <prompt
-      <grammar type="​application/​srgs+xml"​ root="​ROOT"​ mode="​voice"​+                <lexicon uri="​http://​path/​to/​the/​lexicon.dct"/>​ 
-        <lexicon uri="​http://​path/​to/​the/​lexicon.xml"/>​ +                The doc diagnosed the pt with muscae volitantes. 
-        <​rule id="​ROOT">​ +            </​prompt>​ 
-          <​one-of>​ +        </block
-            ​<​item>​tomato</item> +    </​form>​
-            <​item>​George</​item>​ +
-            <​item>​record</​item>​ +
-          </​one-of>​ +
-        </​rule>​ +
-      </​grammar>​ +
-      <prompt>​ +
-        ​Say either tomato or George or record. +
-      ​</prompt>​ +
-      <​filled>​ +
-        <​prompt>​ +
-          You said <value expr="​userchoice"/>​. +
-        </​prompt>​ +
-      </filled+
-    ​</​field>​ +
-  ​</​form>​+
 </​vxml>​ </​vxml>​
 </​code>​ </​code>​
-**lexicon.xml**+ 
 +**lexicon.dct**
 <​code>​ <​code>​
-<?xml version="​1.0"​ encoding="​UTF-8"​ ?> +[Header] 
-<lexicon xml:lang="​en-US"​ +Language ​ENU 
-   alphabet="​application/​sampa;​localization=swi">​ + 
-  <​entry key="​tomato">​ +[SubHeader] 
-    <​definition value="​t@meIt@U"​ /> +Content=EDCT_CONTENT_ORTHOGRAPHIC 
-    <​definition value="​tOmato"​ xml:​lang="​fr-fr"​ /> +Representation=EDCT_REPR_WSZ_STRING 
-    <​definition value="​t@mQt@U"​ /> + 
-  </​entry>​ +[Data] 
-  <​entry key="​George">​ +doc     ​Doctor 
-    <​definition value="​dZO:​rdZ"​ /> +pt      Patient 
-    <​definition value="​ZORZ"​ xml:​lang="​fr-fr"​ /> + 
-  </​entry>​ +[SubHeader] 
-  <​entry key="​record">​ +Content ​EDCT_CONTENT_BROAD_NARROWS 
-    <​definition value="​rek@rd"​ part="​noun"​ /> +Representation ​EDCT_REPR_SZZ_STRING 
-    <​definition value="​rIkO:​rd"​ part="​verb"​ /> + 
-  ​</entry> +[Data] 
-</lexicon>+muscae ​ //'​m^sk^ 
 +volitantes ​     ​//'​vAl.^.t@nz
 </​code>​ </​code>​
-The output of the above script would be: 
  
-Computer: ​Say either tomato or George or record. \\ +Computer: ​The doctor diagnosed the patient with muscae volitantes.
-Human: Tomato. \\ +
-Computer: You said tomato.+