Skip to content

Commit a89099c

Browse files
authored
Merge pull request #358 from Resgrid/develop
RE1-T115 TTS changes and fixed issue with SystemAuth api breaking som…
2 parents 68625b6 + bbd10e3 commit a89099c

22 files changed

Lines changed: 313 additions & 705 deletions

Core/Resgrid.Config/TtsConfig.cs

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public static class TtsConfig
2424
public static int S3PresignedUrlExpiryMinutes = 60;
2525
public static string S3PublicBaseUrl = "";
2626

27-
public static string DefaultVoice = "en-us+klatt6";
28-
public static int DefaultSpeed = 175;
27+
public static string DefaultVoice = "en-us+klatt4";
28+
public static int DefaultSpeed = 165;
2929
public static int MaxConcurrentGenerations = 4;
3030
public static int MaxTextLength = 1000;
3131
public static string EspeakExecutable = "espeak-ng";
@@ -35,7 +35,42 @@ public static class TtsConfig
3535
public static int NormalizedSampleRate = 8000;
3636
public static int NormalizedChannels = 1;
3737
public static bool WarmupEnabled = true;
38-
public static string PreGeneratedPrompts = "Press 1 for yes;Press 2 for no;Invalid option;Please try again;Please stay on the line;This call has been closed. Goodbye.;You have been marked responding to the scene, goodbye.;Sorry, that was not a valid selection.;Hello, this is Resgrid calling with your verification code.;That was your Resgrid verification code. Goodbye.;Thank you for calling Resgrid, automated personnel system. The number you called is not tied to an active department or the department doesn't have this feature enabled. Goodbye.;We couldn't complete your verification call. Please request a new code and try again. Goodbye.;Please select from the following options.;To list current active calls, press 1.;To list current user statuses, press 2.;To list current unit statuses, press 3.;To list upcoming calendar events, press 4.;To list upcoming shifts, press 5.;To set your current status, press 6.;To set your current staffing level, press 7.;Press 0 to repeat. Press 1 to respond to the scene.;Press 0 to go back to the main menu.;Invalid status selection, goodbye.;No status selection made, goodbye.;Invalid staffing selection. Returning to the main menu.;No staffing selection made. Returning to the main menu.;Thank you. Your response has been recorded.";
38+
public static string PreGeneratedPrompts = string.Join(";", new[]
39+
{
40+
"Press 1 for yes",
41+
"Press 2 for no",
42+
"Invalid option",
43+
"Please try again",
44+
"Please stay on the line",
45+
"This call has been closed. Goodbye.",
46+
"You have been marked responding to the scene. Goodbye.",
47+
"Sorry, that was not a valid selection.",
48+
"Hello, this is Resgrid calling with your verification code.",
49+
"That was your Resgrid verification code. Goodbye.",
50+
"Thank you for calling the Resgrid automated personnel system. The number you called is not tied to an active department, or the department doesn't have this feature enabled. Goodbye.",
51+
"We couldn't complete your verification call. Please request a new code and try again. Goodbye.",
52+
"Please select from the following options.",
53+
"To list current active calls, press 1.",
54+
"To list current user statuses, press 2.",
55+
"To list current unit statuses, press 3.",
56+
"To list upcoming calendar events, press 4.",
57+
"To list upcoming shifts, press 5.",
58+
"To set your current status, press 6.",
59+
"To set your current staffing level, press 7.",
60+
"Press 0 to repeat. Press 1 to respond to the scene.",
61+
"To hear the dispatch again, press 1. To hear response options, press 2.",
62+
"To choose a response option, enter the option number, then press pound.",
63+
"To hear the dispatch again, enter 0 and press pound.",
64+
"Press 0 to go back to the main menu.",
65+
"To go back to the main menu, enter 0 and press pound.",
66+
"To set your current status, enter the number of your selection, then press pound.",
67+
"To set your current staffing, enter the number of your selection, then press pound.",
68+
"Invalid status selection. Returning to the main menu.",
69+
"No status selection made. Returning to the main menu.",
70+
"Invalid staffing selection. Returning to the main menu.",
71+
"No staffing selection made. Returning to the main menu.",
72+
"Thank you. Your response has been recorded."
73+
});
3974

4075
public static int RateLimitPermitLimit = 60;
4176
public static int RateLimitQueueLimit = 10;

Tests/Resgrid.Tests/Services/DepartmentSettingsServiceTtsLanguageTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void SetUp()
4141
_cacheProvider.Object);
4242

4343
global::Resgrid.Config.SystemBehaviorConfig.CacheEnabled = false;
44-
TtsConfig.DefaultVoice = "en-us+klatt6";
44+
TtsConfig.DefaultVoice = "en-us+klatt4";
4545
}
4646

4747
[TearDown]
@@ -83,7 +83,7 @@ public async Task should_fall_back_to_default_tts_language_when_setting_missing(
8383
[Test]
8484
public async Task should_fall_back_to_default_tts_language_when_setting_is_invalid()
8585
{
86-
TtsConfig.DefaultVoice = "fr+klatt6";
86+
TtsConfig.DefaultVoice = "fr+klatt4";
8787

8888
_departmentSettingsRepository
8989
.Setup(x => x.GetDepartmentSettingByIdTypeAsync(7, DepartmentSettingTypes.TtsLanguage))

0 commit comments

Comments
 (0)