From d0e11c73cd18a01d0876b985541e2e66a5de46fc Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Wed, 18 Sep 2019 15:09:11 +0200 Subject: [PATCH] Address review comments --- native_client/deepspeech.h | 4 +++- native_client/dotnet/DeepSpeechConsole/Program.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/native_client/deepspeech.h b/native_client/deepspeech.h index 6c7fe08c..df64261c 100644 --- a/native_client/deepspeech.h +++ b/native_client/deepspeech.h @@ -30,7 +30,9 @@ typedef struct MetadataItem { typedef struct Metadata { MetadataItem* items; int num_items; - // Approximated confidence value for this transcription. + // Approximated confidence value for this transcription. This is roughly the + // sum of the acoustic model logit values for each timestep/character that + // contributed to the creation of this transcription. double confidence; } Metadata; diff --git a/native_client/dotnet/DeepSpeechConsole/Program.cs b/native_client/dotnet/DeepSpeechConsole/Program.cs index 1cfbc686..0940e63c 100644 --- a/native_client/dotnet/DeepSpeechConsole/Program.cs +++ b/native_client/dotnet/DeepSpeechConsole/Program.cs @@ -26,7 +26,7 @@ namespace CSharpExamples var nl = Environment.NewLine; string retval = Environment.NewLine + $"Recognized text: {string.Join("", meta?.Items?.Select(x => x.Character))} {nl}" - + $"Prob: {meta?.Probability} {nl}" + + $"Confidence: {meta?.Confidence} {nl}" + $"Item count: {meta?.Items?.Length} {nl}" + string.Join(nl, meta?.Items?.Select(x => $"Timestep : {x.Timestep} TimeOffset: {x.StartTime} Char: {x.Character}")); return retval;