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

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

Issue 8201030: Introducing the basic functionality to the speech input experimental API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removing nit and adding application locale as default language. Created 9 years, 2 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
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 "description": "Information about the current state of the system vo lume control, including whether it is muted." 524 "description": "Information about the current state of the system vo lume control, including whether it is muted."
525 } 525 }
526 ] 526 ]
527 } 527 }
528 ] 528 ]
529 }, 529 },
530 { 530 {
531 "namespace": "experimental.speechInput", 531 "namespace": "experimental.speechInput",
532 "types": [ 532 "types": [
533 { 533 {
534 "id": "StartOptions", 534 "id": "SpeechInputStartOptions",
535 "type": "object", 535 "type": "object",
536 "description": "Object describing the options used for speech recognitio n.", 536 "description": "Object describing the options used for speech recognitio n.",
537 "properties": { 537 "properties": {
538 "language": { 538 "language": {
539 "type": "string", 539 "type": "string",
540 "optional": true, 540 "optional": true,
541 "description": "BCP-47 language code of the language to recognize. W hen set to 'auto' or not defined defaults to user's most preferred content langu age. Will use 'en-US' if not supported or invalid." 541 "description": "BCP-47 language code of the language to recognize. W hen set to 'auto' or not defined defaults to user's most preferred content langu age. Will use 'en-US' if not supported or invalid."
542 }, 542 },
543 "grammar": { 543 "grammar": {
544 "type": "string", 544 "type": "string",
545 "description": "Name of the grammar to use. Defaults to 'builtin:sea rch'.", 545 "description": "Name of the grammar to use. Defaults to 'builtin:sea rch'.",
546 "optional": true 546 "optional": true
547 }, 547 },
548 "filterProfanities": { 548 "filterProfanities": {
549 "type": "boolean", 549 "type": "boolean",
550 "optional": true, 550 "optional": true,
551 "description": "Enable or disable profanity filtering. Will use the default Chrome filtering settings if not provided." 551 "description": "Enable or disable profanity filtering. Will use the default Chrome filtering settings if not set."
552 } 552 }
553 } 553 }
554 }, 554 },
555 { 555 {
556 "id": "Error", 556 "id": "SpeechInputError",
557 "type": "object", 557 "type": "object",
558 "description": "Object describing a speech input error.", 558 "description": "Object describing a speech input error.",
559 "properties": { 559 "properties": {
560 "code": { 560 "code": {
561 "type": "string", 561 "type": "string",
562 "enum": ["noDevicesAvailable", "unableToStart", "noSpeechHeard", "no Results", "captureError", "networkError", "internalError", "requestDenied"], 562 "enum": ["noSpeechHeard", "noResults", "captureError", "networkError "],
563 "description": "Code identifying the error case." 563 "description": "Code identifying the error case."
564 } 564 }
565 } 565 }
566 }, 566 },
567 { 567 {
568 "id": "ResultHypothesis", 568 "id": "SpeechInputResultHypothesis",
569 "type": "object", 569 "type": "object",
570 "description": "Object describing a speech recognition hypothesis.", 570 "description": "Object describing a speech recognition hypothesis.",
571 "properties": { 571 "properties": {
572 "utterance": { 572 "utterance": {
573 "type": "string", 573 "type": "string",
574 "description": "Text of this hypothesis." 574 "description": "Text of this hypothesis."
575 }, 575 },
576 "confidence": { 576 "confidence": {
577 "type": "number", 577 "type": "number",
578 "description": "Confidence of the hypothesis. Rated from 0 (lowest) to 1 (highest)." 578 "description": "Confidence of the hypothesis. Rated from 0 (lowest) to 1 (highest)."
579 } 579 }
580 } 580 }
581 }, 581 },
582 { 582 {
583 "id": "SpeechResultEvent", 583 "id": "SpeechInputResultEvent",
584 "type": "object", 584 "type": "object",
585 "description": "Object containing the recognition results.", 585 "description": "Object containing the recognition results.",
586 "properties": { 586 "properties": {
587 "hypotheses": { 587 "hypotheses": {
588 "type": "array", 588 "type": "array",
589 "optional": true, 589 "optional": true,
590 "description": "Array of zero or more objects describing the stable candidate hypotheses sorted by decreasing likelihood.", 590 "description": "Array of zero or more objects describing the stable candidate hypotheses sorted by decreasing likelihood.",
591 "items": { "$ref": "ResultHypothesis" } 591 "items": { "$ref": "SpeechInputResultHypothesis" }
592 } 592 }
593 } 593 }
594 } 594 }
595 ], 595 ],
596 "functions": [ 596 "functions": [
597 { 597 {
598 "name": "start", 598 "name": "start",
599 "type": "function", 599 "type": "function",
600 "description": "Request to start recording as a new speech recognition s ession.", 600 "description": "Request to start recording as a new speech recognition s ession.",
601 "parameters": [ 601 "parameters": [
602 { 602 {
603 "name": "options", 603 "name": "options",
604 "$ref": "StartOptions", 604 "$ref": "SpeechInputStartOptions",
605 "optional": true, 605 "optional": true,
606 "description": "Options used for this speech recognition session." 606 "description": "Options used for this speech recognition session."
607 }, 607 },
608 { 608 {
609 "name": "callback", 609 "name": "callback",
610 "type": "function", 610 "type": "function",
611 "optional": true, 611 "optional": true,
612 "description": "Called when the speech recognition session has succe ssfully started recording.", 612 "description": "Called when the speech recognition session has succe ssfully started recording.",
613 "parameters": [] 613 "parameters": []
614 } 614 }
615 ] 615 ]
616 }, 616 },
617 { 617 {
618 "name": "stop", 618 "name": "stop",
619 "type": "function", 619 "type": "function",
620 "description": "Request to stop an ongoing speech recognition session.", 620 "description": "Request to stop an ongoing speech recognition session.",
621 "parameters": [ 621 "parameters": [
622 { 622 {
623 "name": "callback", 623 "name": "callback",
624 "type": "function", 624 "type": "function",
625 "optional": true, 625 "optional": true,
626 "description": "Called when the audio recording has stopped and any pending recognition results have been completed.", 626 "description": "Called when the audio recording has stopped and any pending recognition results have been completed.",
627 "parameters": [] 627 "parameters": []
628 } 628 }
629 ] 629 ]
630 }, 630 },
631 { 631 {
632 "name": "isRecording", 632 "name": "isRecording",
633 "type": "function", 633 "type": "function",
634 "description": "Determine if the API is currently recording audio as par t of a speech recognition session.", 634 "description": "Determine if audio recording is currently in process in Chrome, not limited to this API.",
635 "parameters": [ 635 "parameters": [
636 { 636 {
637 "name": "callback", 637 "name": "callback",
638 "type": "function", 638 "type": "function",
639 "optional": true, 639 "optional": true,
640 "parameters": [ 640 "parameters": [
641 { 641 {
642 "name": "result", 642 "name": "result",
643 "type": "boolean", 643 "type": "boolean",
644 "description": "Flag set to true if the API is currently recordi ng for speech recognition." 644 "description": "Flag set to true if recording is in process in C hrome, false otherwise."
645 } 645 }
646 ] 646 ]
647 } 647 }
648 ] 648 ]
649 } 649 }
650 ], 650 ],
651 "events": [ 651 "events": [
652 { 652 {
653 "name": "onError", 653 "name": "onError",
654 "type": "function", 654 "type": "function",
655 "description": "Called in case of an error in speech recognition.", 655 "description": "Called in case of an error in speech recognition.",
656 "parameters": [ 656 "parameters": [
657 { 657 {
658 "name": "error", 658 "name": "error",
659 "$ref": "Error", 659 "$ref": "SpeechInputError",
660 "description": "Error being reported." 660 "description": "Error being reported."
661 } 661 }
662 ] 662 ]
663 }, 663 },
664 { 664 {
665 "name": "onSoundStart", 665 "name": "onSoundStart",
666 "type": "function", 666 "type": "function",
667 "description": "Called when the system starts detecting sound in the inp ut data.", 667 "description": "Called when the system starts detecting sound in the inp ut data.",
668 "parameters": [] 668 "parameters": []
669 }, 669 },
670 { 670 {
671 "name": "onSoundEnd", 671 "name": "onSoundEnd",
672 "type": "function", 672 "type": "function",
673 "description": "Called when the system detects enough silence to conside r the ongoing input has ended.", 673 "description": "Called when the system detects enough silence to conside r the ongoing speech has ended.",
674 "parameters": [] 674 "parameters": []
675 }, 675 },
676 { 676 {
677 "name": "onResult", 677 "name": "onResult",
678 "type": "function", 678 "type": "function",
679 "description": "Called when speech recognition results are available.", 679 "description": "Called when speech recognition results are available.",
680 "parameters": [ 680 "parameters": [
681 { 681 {
682 "name": "event", 682 "name": "event",
683 "$ref": "SpeechResultEvent", 683 "$ref": "SpeechInputResultEvent",
684 "description": "Object containing the speech recognition results." 684 "description": "Object containing the speech recognition results."
685 } 685 }
686 ] 686 ]
687 } 687 }
688 ] 688 ]
689 }, 689 },
690 { 690 {
691 "namespace": "tts", 691 "namespace": "tts",
692 "types": [ 692 "types": [
693 { 693 {
(...skipping 8261 matching lines...) Expand 10 before | Expand all | Expand 10 after
8955 "optional": "true", 8955 "optional": "true",
8956 "description": "The MHTML data as a Blob." 8956 "description": "The MHTML data as a Blob."
8957 } 8957 }
8958 ] 8958 ]
8959 } 8959 }
8960 ] 8960 ]
8961 } 8961 }
8962 ] 8962 ]
8963 } 8963 }
8964 ] 8964 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698