From 643d29d2619cabaabad083752fe3a033236eb5db Mon Sep 17 00:00:00 2001 From: Solovev Sergei Date: Fri, 27 Nov 2020 13:39:52 +0300 Subject: [PATCH 1/2] add denormalization flag --- apis/tinkoff/cloud/stt/v1/stt.proto | 2 ++ apis_ru/tinkoff/cloud/stt/v1/stt.proto | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apis/tinkoff/cloud/stt/v1/stt.proto b/apis/tinkoff/cloud/stt/v1/stt.proto index ec84a98..ea7c933 100644 --- a/apis/tinkoff/cloud/stt/v1/stt.proto +++ b/apis/tinkoff/cloud/stt/v1/stt.proto @@ -86,6 +86,8 @@ message RecognitionConfig { // Common regognition configuration. bool do_not_perform_vad = 13; // Flag to disable phrase range detection. All speech shall be recognized as single phrase with this flag set to true. VoiceActivityDetectionConfig vad_config = 14; // Structure to customize VAD settings. } + reserved 15; + bool enable_denormalization = 16; // Enables automatic conversion of numerals from text to numeric form. Applies only to the first (most likely) version of the final hypothesis. } message RecognizeRequest { // Request to recognize using Recognize method. diff --git a/apis_ru/tinkoff/cloud/stt/v1/stt.proto b/apis_ru/tinkoff/cloud/stt/v1/stt.proto index 7bebe11..86a2801 100644 --- a/apis_ru/tinkoff/cloud/stt/v1/stt.proto +++ b/apis_ru/tinkoff/cloud/stt/v1/stt.proto @@ -86,6 +86,8 @@ message RecognitionConfig { // Общие настройки для распоз bool do_not_perform_vad = 13; // Флаг выключающий разбиение на фразы, т. е. VAD.
Весь распознанный текст будет получен в виде одной фразы. VoiceActivityDetectionConfig vad_config = 14; // Структура для переопределения настроек VAD. } + reserved 15; + bool enable_denormalization = 16; // Включает автоматическое преобразование числительных из текстовой формы в цифровую. Применяется только для первой (наиболее вероятной) версии финальной гипотезы. } message RecognizeRequest { // Запрос на распознавание аудио по методу Recognize. From a6888fdf1fd6e93bfd5b4dae62ebdd4284c0d81c Mon Sep 17 00:00:00 2001 From: Solovev Sergei Date: Fri, 27 Nov 2020 13:45:14 +0300 Subject: [PATCH 2/2] remove comment that WordInfo is not working --- apis/tinkoff/cloud/stt/v1/stt.proto | 2 +- apis_ru/tinkoff/cloud/stt/v1/stt.proto | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/tinkoff/cloud/stt/v1/stt.proto b/apis/tinkoff/cloud/stt/v1/stt.proto index ea7c933..c3cdba1 100644 --- a/apis/tinkoff/cloud/stt/v1/stt.proto +++ b/apis/tinkoff/cloud/stt/v1/stt.proto @@ -54,7 +54,7 @@ message SpeechContext { // Currently unused. Declares a vocabulary of wor repeated string words = 2; // Individual words to recognize with higher probability. } -message WordInfo { // Currently unsupported. Detailed information on recognized word. +message WordInfo { // Detailed information on recognized word. google.protobuf.Duration start_time = 1; // Word start time inside input audiostream. google.protobuf.Duration end_time = 2; // Word end time inside input audiostream. string word = 3; // Word inside phrase. diff --git a/apis_ru/tinkoff/cloud/stt/v1/stt.proto b/apis_ru/tinkoff/cloud/stt/v1/stt.proto index 86a2801..fe965fc 100644 --- a/apis_ru/tinkoff/cloud/stt/v1/stt.proto +++ b/apis_ru/tinkoff/cloud/stt/v1/stt.proto @@ -54,7 +54,7 @@ message SpeechContext { // Не используется на данный м repeated string words = 2; // Отдельные слова для распознавания с повышенной вероятностью. } -message WordInfo { // Не поддерживается на данный момент. Детальная информация по слову внутри фразы. +message WordInfo { // Детальная информация по слову внутри фразы. google.protobuf.Duration start_time = 1; // Время начала слова внутри аудиопотока на входе. google.protobuf.Duration end_time = 2; // Время конца слова внутри аудиопотока на входе. string word = 3; // Слово внутри фразы. @@ -101,7 +101,7 @@ message SpeechRecognitionAlternative { // Версия распознанной repeated WordInfo words = 3; // Не поддерживается на данный момент. Список отдельных слов внутри фразы. } -message SpeechRecognitionResult { // Распозная фраза для указанного аудио канала. +message SpeechRecognitionResult { // Распознанная фраза для указанного аудио канала. repeated SpeechRecognitionAlternative alternatives = 1; // Список версий фразы отсортированных по убыванию confidence. int32 channel = 2; // Канал, к которому относится версия фразы (нумерация с 0). google.protobuf.Duration start_time = 3; // Время начала фразы внутри аудиопотока на входе.