Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8a6c10b2 authored by Aleksandar Kiridzic's avatar Aleksandar Kiridzic Committed by Aleksandar Kiridžić
Browse files

speech: Public API for speech recognition world level info

Following entities are added as part of this change:
 - RecognitionPart data class;
 - "android.speech.extra.REQUEST_WORD_TIMING"
and "android.speech.extra.REQUEST_WORD_CONFIDENCE"
key entries for RecognizerIntent extras;
 - "recognition_parts" key entry for SpeechRecognizer result Bundle.

A recognition part represents a single word with potential adjacent
punctuation, that is returned by the SpeechRecognizer. Recognizer
result bundle contains the result in form of a list
of recognition parts under the key recognition_parts.

The details provided for a recognition part are:
 - raw text - in form of a string, always available;
 - formatted text - in form of a string, available if
"android.speech.extra.ENABLE_FORMATTING" is set in the intent;
 - timestamp - offset of the beginning of this part from the start of
the recognition session in milliseconds, available if
"android.speech.extra.REQUEST_WORD_TIMING" is set in the intent;
 - confidence level - one of the five levels of confidence, available
if "android.speech.extra.REQUEST_WORD_CONFIDENCE" is set in the intent.

Bug: 268024544
Bug: 268475583
Test: A new CTS
Change-Id: Ic1ad2a9658a044d4deb9776811f070cb0b2564a8
parent d6c4f75c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment