| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview Base class for Text-to-Speech engines that actually transform | 6 * @fileoverview Base class for Text-to-Speech engines that actually transform |
| 7 * text to speech. | 7 * text to speech. |
| 8 * | 8 * |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 /** | 415 /** |
| 416 * Flag indicating if the TTS is being debugged. | 416 * Flag indicating if the TTS is being debugged. |
| 417 * @type {boolean} | 417 * @type {boolean} |
| 418 */ | 418 */ |
| 419 cvox.AbstractTts.DEBUG = true; | 419 cvox.AbstractTts.DEBUG = true; |
| 420 | 420 |
| 421 | 421 |
| 422 /** | 422 /** |
| 423 * Character dictionary. These symbols are replaced with their human readable | 423 * Character dictionary. These symbols are replaced with their human readable |
| 424 * equivalents. This replacement only occurs for single character utterances. | 424 * equivalents. This replacement only occurs for single character utterances. |
| 425 * @type {Object.<string, string>} | 425 * @type {Object<string, string>} |
| 426 */ | 426 */ |
| 427 cvox.AbstractTts.CHARACTER_DICTIONARY = { | 427 cvox.AbstractTts.CHARACTER_DICTIONARY = { |
| 428 ' ': 'space', | 428 ' ': 'space', |
| 429 '`': 'backtick', | 429 '`': 'backtick', |
| 430 '~': 'tilde', | 430 '~': 'tilde', |
| 431 '!': 'exclamation', | 431 '!': 'exclamation', |
| 432 '@': 'at', | 432 '@': 'at', |
| 433 '#': 'pound', | 433 '#': 'pound', |
| 434 '$': 'dollar', | 434 '$': 'dollar', |
| 435 '%': 'percent', | 435 '%': 'percent', |
| (...skipping 26 matching lines...) Expand all Loading... |
| 462 '\n': 'new_line', | 462 '\n': 'new_line', |
| 463 '\\': 'backslash' | 463 '\\': 'backslash' |
| 464 }; | 464 }; |
| 465 | 465 |
| 466 | 466 |
| 467 /** | 467 /** |
| 468 * Pronunciation dictionary. Each key must be lowercase, its replacement | 468 * Pronunciation dictionary. Each key must be lowercase, its replacement |
| 469 * should be spelled out the way most TTS engines will pronounce it | 469 * should be spelled out the way most TTS engines will pronounce it |
| 470 * correctly. This particular dictionary only handles letters and numbers, | 470 * correctly. This particular dictionary only handles letters and numbers, |
| 471 * no symbols. | 471 * no symbols. |
| 472 * @type {Object.<string, string>} | 472 * @type {Object<string, string>} |
| 473 */ | 473 */ |
| 474 cvox.AbstractTts.PRONUNCIATION_DICTIONARY = { | 474 cvox.AbstractTts.PRONUNCIATION_DICTIONARY = { |
| 475 'admob': 'ad-mob', | 475 'admob': 'ad-mob', |
| 476 'adsense': 'ad-sense', | 476 'adsense': 'ad-sense', |
| 477 'adwords': 'ad-words', | 477 'adwords': 'ad-words', |
| 478 'angularjs': 'angular j s', | 478 'angularjs': 'angular j s', |
| 479 'bcc': 'B C C', | 479 'bcc': 'B C C', |
| 480 'cc': 'C C', | 480 'cc': 'C C', |
| 481 'chromevox': 'chrome vox', | 481 'chromevox': 'chrome vox', |
| 482 'cr48': 'C R 48', | 482 'cr48': 'C R 48', |
| (...skipping 19 matching lines...) Expand all Loading... |
| 502 cvox.AbstractTts.pronunciationDictionaryRegexp_; | 502 cvox.AbstractTts.pronunciationDictionaryRegexp_; |
| 503 | 503 |
| 504 | 504 |
| 505 /** | 505 /** |
| 506 * Substitution dictionary. These symbols or patterns are ALWAYS substituted | 506 * Substitution dictionary. These symbols or patterns are ALWAYS substituted |
| 507 * whenever they occur, so this should be reserved only for unicode characters | 507 * whenever they occur, so this should be reserved only for unicode characters |
| 508 * and characters that never have any different meaning in context. | 508 * and characters that never have any different meaning in context. |
| 509 * | 509 * |
| 510 * For example, do not include '$' here because $2 should be read as | 510 * For example, do not include '$' here because $2 should be read as |
| 511 * "two dollars". | 511 * "two dollars". |
| 512 * @type {Object.<string, string>} | 512 * @type {Object<string, string>} |
| 513 */ | 513 */ |
| 514 cvox.AbstractTts.SUBSTITUTION_DICTIONARY = { | 514 cvox.AbstractTts.SUBSTITUTION_DICTIONARY = { |
| 515 '://': 'colon slash slash', | 515 '://': 'colon slash slash', |
| 516 '\u00bc': 'one fourth', | 516 '\u00bc': 'one fourth', |
| 517 '\u00bd': 'one half', | 517 '\u00bd': 'one half', |
| 518 '\u2190': 'left arrow', | 518 '\u2190': 'left arrow', |
| 519 '\u2191': 'up arrow', | 519 '\u2191': 'up arrow', |
| 520 '\u2192': 'right arrow', | 520 '\u2192': 'right arrow', |
| 521 '\u2193': 'down arrow', | 521 '\u2193': 'down arrow', |
| 522 '\u21d0': 'left double arrow', | 522 '\u21d0': 'left double arrow', |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 .format({'COUNT': count}) + ' '; | 585 .format({'COUNT': count}) + ' '; |
| 586 }; | 586 }; |
| 587 | 587 |
| 588 | 588 |
| 589 /** | 589 /** |
| 590 * @override | 590 * @override |
| 591 */ | 591 */ |
| 592 cvox.AbstractTts.prototype.getDefaultProperty = function(property) { | 592 cvox.AbstractTts.prototype.getDefaultProperty = function(property) { |
| 593 return this.propertyDefault[property]; | 593 return this.propertyDefault[property]; |
| 594 }; | 594 }; |
| OLD | NEW |