Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/common/extensions/api/extension_api.json

Issue 7282048: Update TTS extension API docs to reflect latest changes. Note that this (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/extensions/docs/experimental.tts.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "unprivileged": true, 4 "unprivileged": true,
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "MessageSender", 7 "id": "MessageSender",
8 "type": "object", 8 "type": "object",
9 "description": "An object containing information about the script contex t that sent a message or request.", 9 "description": "An object containing information about the script contex t that sent a message or request.",
10 "properties": { 10 "properties": {
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 "namespace": "experimental.tts", 510 "namespace": "experimental.tts",
511 "types": [ 511 "types": [
512 { 512 {
513 "id": "TtsEvent", 513 "id": "TtsEvent",
514 "type": "object", 514 "type": "object",
515 "description": "An event from the TTS engine to communicate the status o f an utterance.", 515 "description": "An event from the TTS engine to communicate the status o f an utterance.",
516 "properties": { 516 "properties": {
517 "type": { 517 "type": {
518 "type": "string", 518 "type": "string",
519 "enum": ["start", "end", "word", "sentence", "marker", "interrupted" , "cancelled", "error"], 519 "enum": ["start", "end", "word", "sentence", "marker", "interrupted" , "cancelled", "error"],
520 "description": "The message can be 'start' when this utterance is be gun to be spoken, 'word' when a word boundary is reached, 'sentence' when a sent ence boundary is reached, 'marker' when an SSML mark element is reached, 'end' w hen the end of the utterance is reached, 'interrupted' when the utterance is sto pped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, and 'error' when any other error occurs . Clients will always receive 'end', 'cancelled', 'interrupted', or 'error', and other events will depend on the engine." 520 "description": "The type can be 'start' as soon as speech has starte d, 'word' when a word boundary is reached, 'sentence' when a sentence boundary i s reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interru pted before reaching the end, 'cancelled' when it's removed from the queue befor e ever being synthesized, or 'error' when any other error occurs."
521 }, 521 },
522 "charIndex": { 522 "charIndex": {
523 "type": "number", 523 "type": "number",
524 "optional": true, 524 "optional": true,
525 "description": "The index of the current character in the utterance. " 525 "description": "The index of the current character in the utterance. "
526 }, 526 },
527 "errorMessage": { 527 "errorMessage": {
528 "type": "string", 528 "type": "string",
529 "description": "The error message, if the message is 'error'.", 529 "description": "The error description, if the event type is 'error'. ",
530 "optional": true 530 "optional": true
531 }, 531 },
532 "srcId": { 532 "srcId": {
533 "type": "number", 533 "type": "number",
534 "description": "An ID unique to the calling function's context so th at events can get routed back to the correct tts.speak call.", 534 "description": "An ID unique to the calling function's context so th at events can get routed back to the correct tts.speak call.",
535 "nodoc": true, 535 "nodoc": true,
536 "optional": true 536 "optional": true
537 }, 537 },
538 "isFinalEvent": { 538 "isFinalEvent": {
539 "type": "boolean", 539 "type": "boolean",
540 "description": "True if this is the final event that will be sent to this handler.", 540 "description": "True if this is the final event that will be sent to this handler.",
541 "nodoc": true, 541 "nodoc": true,
542 "optional": true 542 "optional": true
543 } 543 }
544 } 544 }
545 }, 545 },
546 { 546 {
547 "id": "TtsVoice", 547 "id": "TtsVoice",
548 "type": "object", 548 "type": "object",
549 "description": "A description of a voice available for speech synthesis. ", 549 "description": "A description of a voice available for speech synthesis. ",
550 "properties": { 550 "properties": {
551 "voiceName": { 551 "voiceName": {
552 "type": "string", 552 "type": "string",
553 "optional": true, 553 "optional": true,
554 "description": "The name of the voice." 554 "description": "The name of the voice."
555 }, 555 },
556 "lang": { 556 "lang": {
557 "type": "string", 557 "type": "string",
558 "optional": true, 558 "optional": true,
559 "description": "The language that this voice supports, in the form & lt;language&gt;-&lt;region&gt;. Examples: 'en', 'en-US', 'en-GB', 'zh-CN', etc." 559 "description": "The language that this voice supports, in the form < em>language</em>-<em>region</em>. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'."
560 }, 560 },
561 "gender": { 561 "gender": {
562 "type": "string", 562 "type": "string",
563 "optional": true, 563 "optional": true,
564 "description": "This voice's gender.", 564 "description": "This voice's gender.",
565 "enum": ["male", "female"] 565 "enum": ["male", "female"]
566 }, 566 },
567 "extensionId": { 567 "extensionId": {
568 "type": "string", 568 "type": "string",
569 "optional": true, 569 "optional": true,
(...skipping 10 matching lines...) Expand all
580 ], 580 ],
581 "functions": [ 581 "functions": [
582 { 582 {
583 "name": "speak", 583 "name": "speak",
584 "type": "function", 584 "type": "function",
585 "description": "Speak text using a text-to-speech engine.", 585 "description": "Speak text using a text-to-speech engine.",
586 "parameters": [ 586 "parameters": [
587 { 587 {
588 "type": "string", 588 "type": "string",
589 "name": "utterance", 589 "name": "utterance",
590 "description": "The text to speak, either plaintext or a complete we ll-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 character s." 590 "description": "The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip aw ay the tags and speak the text. The maximum length of the text is 32,768 charact ers."
591 }, 591 },
592 { 592 {
593 "type": "object", 593 "type": "object",
594 "name": "options", 594 "name": "options",
595 "optional": true, 595 "optional": true,
596 "description": "The speech options.", 596 "description": "The speech options.",
597 "properties": { 597 "properties": {
598 "enqueue": { 598 "enqueue": {
599 "type": "boolean", 599 "type": "boolean",
600 "optional": true, 600 "optional": true,
601 "description": "If true, enqueues this utterance if TTS is alrea dy in progress. If false (the default), interrupts any current speech and flushe s the speech queue before speaking this new utterance." 601 "description": "If true, enqueues this utterance if TTS is alrea dy in progress. If false (the default), interrupts any current speech and flushe s the speech queue before speaking this new utterance."
602 }, 602 },
603 "voiceName": { 603 "voiceName": {
604 "type": "string", 604 "type": "string",
605 "optional": true, 605 "optional": true,
606 "description": "The name of the voice to use for synthesis. If e mpty, uses any available voice." 606 "description": "The name of the voice to use for synthesis. If e mpty, uses any available voice."
607 }, 607 },
608 "extensionId": { 608 "extensionId": {
609 "type": "string", 609 "type": "string",
610 "optional": true, 610 "optional": true,
611 "description": "The specific extension ID of the speech engine t o use, if known." 611 "description": "The extension ID of the speech engine to use, if known."
612 }, 612 },
613 "lang": { 613 "lang": {
614 "type": "string", 614 "type": "string",
615 "optional": true, 615 "optional": true,
616 "description": "The language to be used for synthesis, in the fo rm &lt;language&gt;-&lt;region&gt;. Examples: 'en', 'en-US', 'en-GB', 'zh-CN', e tc." 616 "description": "The language to be used for synthesis, in the fo rm <em>language</em>-<em>region</em>. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. "
617 }, 617 },
618 "gender": { 618 "gender": {
619 "type": "string", 619 "type": "string",
620 "optional": true, 620 "optional": true,
621 "description": "Gender of voice for synthesized speech.", 621 "description": "Gender of voice for synthesized speech.",
622 "enum": ["male", "female"] 622 "enum": ["male", "female"]
623 }, 623 },
624 "rate": { 624 "rate": {
625 "type": "number", 625 "type": "number",
626 "optional": true, 626 "optional": true,
627 "minimum": 0.1, 627 "minimum": 0.1,
628 "maximum": 10, 628 "maximum": 10,
629 "description": "Speaking rate relative to the default rate for t his voice. 1.0 is the default rate, normally around 180 to 220 words per minute, 2.0 would be twice as fast, and 0.5 would be half as fast. Values below 0.1 or above 10.0 are strictly disallowed, but many voices will constrain the minimum a nd maximum rates further - i.e. a particular voice may not actually speak faster than 3 times normal even if you specify a value larger than 3.0." 629 "description": "Speaking rate relative to the default rate for t his voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. Values below 0.1 or above 10.0 a re strictly disallowed, but many voices will constrain the minimum and maximum r ates further&mdash;for example a particular voice may not actually speak faster than 3 times normal even if you specify a value larger than 3.0."
630 }, 630 },
631 "pitch": { 631 "pitch": {
632 "type": "number", 632 "type": "number",
633 "optional": true, 633 "optional": true,
634 "minimum": 0, 634 "minimum": 0,
635 "maximum": 2, 635 "maximum": 2,
636 "description": "Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 1 being highest, with 1.0 being the default pitch of this part icular voice." 636 "description": "Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to a voice's default pitch."
637 }, 637 },
638 "volume": { 638 "volume": {
639 "type": "number", 639 "type": "number",
640 "optional": true, 640 "optional": true,
641 "minimum": 0, 641 "minimum": 0,
642 "maximum": 1, 642 "maximum": 1,
643 "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0." 643 "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0."
644 }, 644 },
645 "requiredEventTypes": { 645 "requiredEventTypes": {
646 "type": "array", 646 "type": "array",
647 "items": {"type": "string"}, 647 "items": {"type": "string"},
648 "optional": true, 648 "optional": true,
649 "description": "The TTS event types the voice must support. If m issing, this criteria will not be used to filter voices." 649 "description": "The TTS event types the voice must support."
650 }, 650 },
651 "desiredEventTypes": { 651 "desiredEventTypes": {
652 "type": "array", 652 "type": "array",
653 "items": {"type": "string"}, 653 "items": {"type": "string"},
654 "optional": true, 654 "optional": true,
655 "description": "The TTS event types that should be sent. If miss ing, all event types will be sent." 655 "description": "The TTS event types that you are interested in l istening to. If missing, all event types may be sent."
656 }, 656 },
657 "onevent": { 657 "onEvent": {
658 "type": "function", 658 "type": "function",
659 "optional": true, 659 "optional": true,
660 "description": "This function is called with events that occur i n the process of speaking the utterance.", 660 "description": "This function is called with events that occur i n the process of speaking the utterance.",
661 "parameters": [ 661 "parameters": [
662 { 662 {
663 "name": "event", 663 "name": "event",
664 "$ref": "TtsEvent", 664 "$ref": "TtsEvent",
665 "description": "The update event from the text-to-speech eng ine indicating the status of this utterance." 665 "description": "The update event from the text-to-speech eng ine indicating the status of this utterance."
666 } 666 }
667 ] 667 ]
668 } 668 }
669 } 669 }
670 }, 670 },
671 { 671 {
672 "type": "function", 672 "type": "function",
673 "name": "callback", 673 "name": "callback",
674 "optional": true, 674 "optional": true,
675 "description": "Called right away, before speech finishes. Check chr ome.extension.lastError to make sure there were no errors. Use options.onevent t o get more detailed feedback.", 675 "description": "Called right away, before speech finishes. Check chr ome.extension.lastError to make sure there were no errors. Use options.onEvent t o get more detailed feedback.",
676 "parameters": [] 676 "parameters": []
677 } 677 }
678 ] 678 ]
679 }, 679 },
680 { 680 {
681 "name": "stop", 681 "name": "stop",
682 "type": "function", 682 "type": "function",
683 "description": "Stop any current speech.", 683 "description": "Stop any current speech.",
684 "parameters": [] 684 "parameters": []
685 }, 685 },
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 "$ref": "TtsEvent", 742 "$ref": "TtsEvent",
743 "description": "The update event from the text-to-speech engine indi cating the status of this utterance." 743 "description": "The update event from the text-to-speech engine indi cating the status of this utterance."
744 } 744 }
745 ] 745 ]
746 } 746 }
747 ], 747 ],
748 "events": [ 748 "events": [
749 { 749 {
750 "name": "onSpeak", 750 "name": "onSpeak",
751 "type": "function", 751 "type": "function",
752 "description": "Called when the user makes a call to tts.speak and the o ptions matches one of the tts_voices from this extension's manifest.", 752 "description": "Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object.",
753 "parameters": [ 753 "parameters": [
754 { 754 {
755 "type": "string", 755 "type": "string",
756 "name": "utterance", 756 "name": "utterance",
757 "description": "The text to speak. This may include SSML, so if your engine does not support SSML, you should strip out all XML markup and synthesiz e only the underlying text content. This is guaranteed to be no more than 32,768 characters. If this engine does not support speaking that many characters at a time, the utterance should be split into smaller chunks and queued internally wi thout returning an error." 757 "description": "The text to speak, specified as either plain text or an SSML document. If your engine does not support SSML, you should strip out al l XML markup and synthesize only the underlying text content. The value of this parameter is guaranteed to be no more than 32,768 characters. If this engine doe s not support speaking that many characters at a time, the utterance should be s plit into smaller chunks and queued internally without returning an error."
758 }, 758 },
759 { 759 {
760 "type": "object", 760 "type": "object",
761 "name": "options", 761 "name": "options",
762 "description": "The speak options.", 762 "description": "Options specified to the tts.speak() method.",
763 "properties": { 763 "properties": {
764 "voiceName": { 764 "voiceName": {
765 "type": "string", 765 "type": "string",
766 "optional": true, 766 "optional": true,
767 "description": "The name of the voice to use for synthesis." 767 "description": "The name of the voice to use for synthesis."
768 }, 768 },
769 "lang": { 769 "lang": {
770 "type": "string", 770 "type": "string",
771 "optional": true, 771 "optional": true,
772 "description": "The language to be used for synthesis, in the fo rm <language>-<region>, e.g. en-US, en-GB, fr-CA, zh-CN, etc." 772 "description": "The language to be used for synthesis, in the fo rm <em>language</em>-<em>region</em>. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. "
773 }, 773 },
774 "gender": { 774 "gender": {
775 "type": "string", 775 "type": "string",
776 "optional": true, 776 "optional": true,
777 "description": "Gender of voice for synthesized speech.", 777 "description": "Gender of voice for synthesized speech.",
778 "enum": ["male", "female"] 778 "enum": ["male", "female"]
779 }, 779 },
780 "rate": { 780 "rate": {
781 "type": "number", 781 "type": "number",
782 "optional": true, 782 "optional": true,
783 "minimum": 0.1, 783 "minimum": 0.1,
784 "maximum": 10.0, 784 "maximum": 10.0,
785 "description": "Speaking rate relative to the default rate for t his voice. 1.0 is the default rate, normally around 180 to 220 words per minute, 2.0 would be twice as fast, and 0.5 would be half as fast. This value is guara nteed to be between 0.1 and 10.0, inclusive. When a voice does not support this full range of rates, the actual rate should be clipped to the range that is supp orted without returning an error." 785 "description": "Speaking rate relative to the default rate for t his voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. This value is guaranteed to be b etween 0.1 and 10.0, inclusive. When a voice does not support this full range of rates, don't return an error. Instead, clip the rate to the range the voice sup ports."
786 }, 786 },
787 "pitch": { 787 "pitch": {
788 "type": "number", 788 "type": "number",
789 "optional": true, 789 "optional": true,
790 "minimum": 0, 790 "minimum": 0,
791 "maximum": 2, 791 "maximum": 2,
792 "description": "Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 1 being highest, with 1.0 being the default pitch of this part icular voice." 792 "description": "Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to this voice's default pitch ."
793 }, 793 },
794 "volume": { 794 "volume": {
795 "type": "number", 795 "type": "number",
796 "optional": true, 796 "optional": true,
797 "minimum": 0, 797 "minimum": 0,
798 "maximum": 1, 798 "maximum": 1,
799 "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0." 799 "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0."
800 } 800 }
801 } 801 }
802 }, 802 },
(...skipping 5694 matching lines...) Expand 10 before | Expand all | Expand 10 after
6497 "description": "A string result code. The value is non-empty on success only in tests.", 6497 "description": "A string result code. The value is non-empty on success only in tests.",
6498 "optional": "true" 6498 "optional": "true"
6499 } 6499 }
6500 ] 6500 ]
6501 } 6501 }
6502 ] 6502 ]
6503 } 6503 }
6504 ] 6504 ]
6505 } 6505 }
6506 ] 6506 ]
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/experimental.tts.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698