4.3 Pronunciation Rules methods
The list of available pronuciation rules languages can be found in the languages table.
- listPronunciationRules()
- Get the data for all user’s pronunciation rules for selected language
- access
-
REST resource: pronunciationrules/
REST method: GET
SOAP method name: listPronunciationRules
- parameters
- token (string)
md5 (string) – tokenized API Key
langId (string) – identifier of a language - result
- pronunciationRules (list of:) – list of pronunciation rules
- id (int) – rule identifier
- stat (int: 1/2/3) – type of substitution
- 1 – simple substitutions, case insensitive
- 2 – simple substitutions, case sensitive
- 3 – regular expressions (currently not available – will be available soon)
- key (string) – pattern to search (“from” part of replacement)
- value (string) – replacement value (“to” part of replacement)
- addPronunciationRule()
- Add any number of pronunciation rules for selected language into user’s account
- access
-
REST resource: pronunciationrules/
REST method: POST
SOAP method name: addPronunciationRule
- parameters
- token (string)
md5 (string) – tokenized API Key
langId (string) – identifier of a language
stat (int: 1/2/3) – type of substitution (see listPronunciationRules() method)key (string) – pattern to search (“from” part of replacement)
value (string) – replacement value (“to” part of replacement) - result
- value of (int: 0/1) – success (1) or failure (0) of the operation
$input = array ( 'token' => $token, 'md5' => md5(md5($apiKey).$token), 'langId' => 'en', 'stat' => 2, // case sensitive 'key' => 'WSG', 'value' => 'Water Savings Groupa' ); |
|
Warning
|
Deleting and modifing the pronunciation rules
Deleting and modifing the pronunciation rules’ methods are irreversible! |
- modifyPronunciationRule()
- Modify any number of user’s pronunciation rules for selected language
- access
-
REST resource: pronunciationrules/<id>
REST method: PUT
SOAP method name: modifyPronunciationRule
- parameters
- token (string)
md5 (string) – tokenized API KeylangId (string) – identifier of a language
id (int) – rule identifier, it could be aquired by using the listPronunciationRules() method
stat (int: 1/2/3) – type of substitution (see listPronunciationRules() method)key (string) – pattern to search (“from” part of replacement)
value (string) – replacement value (“to” part of replacement) - result
- value of (int: 0/1) – success (1) or failure (0) of the operation
- deletePronunciationRule()
- Delete any number of user’s pronunciation rules for selected language.
- access
-
REST resource: pronunciationrules/<id>
REST method: DELETE
SOAP method name: deletePronunciationRule
- parameters
- token (string)
md5 (string) – tokenized API KeylangId (string) – identifier of a language
id (int) – rule identifier, it could be aquired by using the listPronunciationRules() method - result
- value of (int: 0/1) – success (1) or failure (0) of the operation