Skip to content

Commit

Permalink
Merge pull request #2 from CPqD/fix/recognition_config
Browse files Browse the repository at this point in the history
[KASR-2038] Correção nas configurações
  • Loading branch information
felipebiaggi authored Feb 16, 2021
2 parents e8a4fa3 + 8002273 commit 1cd5af6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CPqDASR.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=db5f2084_002Dc15e_002D4b50_002D8fc2_002D59223b8a976f/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="BasicSLM" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
&lt;TestAncestor&gt;&#xD;
&lt;TestId&gt;MSTest::7F847EF7-7044-4F51-9CF5-D662947F2934::.NETCoreApp,Version=v2.0::CPqDASRUnitTest.Recognizer.SpeechRecognitionUnitTest.BasicSLM&lt;/TestId&gt;&#xD;
&lt;/TestAncestor&gt;&#xD;
&lt;/SessionState&gt;</s:String></wpf:ResourceDictionary>
File renamed without changes.
4 changes: 2 additions & 2 deletions CPqDASR/Config/RecognitionConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public class RecognitionConfig
/// <summary>
/// Habilita a supressão de tons de telefonia no reconhecimento.
/// </summary>
public bool? EndpointerUseToneDetectors { get; set; } = false;
public bool? EndpointerUseToneDetectors { get; set; }

/// <summary>
/// Controla a exibição dos detalhes por palavra.
Expand All @@ -174,7 +174,7 @@ public class RecognitionConfig
/// <summary>
/// Habilita a formatação automática de números, datas, horários, etc.
/// </summary>
public bool? Textify { get; set; } = false;
public bool? Textify { get; set; }

/// <summary>
///
Expand Down
8 changes: 4 additions & 4 deletions CPqDASR/Protocol/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ private string GetCommand(RecognitionConfig objRecognitionConfig)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderConfidenceThreshold, objRecognitionConfig.ConfidenceThreshold));

if (objRecognitionConfig.EndpointerUseToneDetectors != null)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderEndpointerUseToneDetectors, objRecognitionConfig.EndpointerUseToneDetectors));
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderEndpointerUseToneDetectors, objRecognitionConfig.EndpointerUseToneDetectors.ToString().ToLower()));

if (objRecognitionConfig.WordDetails != null)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderWordDetails, objRecognitionConfig.WordDetails));
Expand All @@ -1029,10 +1029,10 @@ private string GetCommand(RecognitionConfig objRecognitionConfig)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderHintsWords, objRecognitionConfig.HintsWords));

if(objRecognitionConfig.Textify != null)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderTextify, objRecognitionConfig.Textify));
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderTextify, objRecognitionConfig.Textify.ToString().ToLower()));

if(objRecognitionConfig.FormattingEnabled != null)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderFormattingEnabled, objRecognitionConfig.FormattingEnabled));
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderFormattingEnabled, objRecognitionConfig.FormattingEnabled.ToString().ToLower()));

if(objRecognitionConfig.TextifyFormattingRules != null)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderTextifyFormattingRules, objRecognitionConfig.TextifyFormattingRules));
Expand All @@ -1041,7 +1041,7 @@ private string GetCommand(RecognitionConfig objRecognitionConfig)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderLoggingTag, objRecognitionConfig.LoggingTag));

if(objRecognitionConfig.PartialResultEnabled != null)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderPartialResultEnabled, objRecognitionConfig.PartialResultEnabled));
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderPartialResultEnabled, objRecognitionConfig.PartialResultEnabled.ToString().ToLower()));

if(objRecognitionConfig.PartialResultInterval != null)
str.AppendLine(string.Format("{0}:{1}", RecognitionConfig.HeaderPartialResultInterval, objRecognitionConfig.PartialResultInterval));
Expand Down

0 comments on commit 1cd5af6

Please sign in to comment.