Make meeting lifecycle stateful

This commit is contained in:
2026-05-27 12:55:17 +02:00
parent d607b957bb
commit e85274829a
91 changed files with 4076 additions and 479 deletions
@@ -1,5 +1,6 @@
using MeetingAssistant.Recording;
using MeetingAssistant.Transcription;
using Microsoft.CognitiveServices.Speech;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
@@ -62,6 +63,50 @@ public sealed class AzureSpeechStreamingTranscriptionProviderTests
]));
}
[Fact]
public void CreateSpeechConfigSkipsConfiguredPostProcessingOptionForConversationTranscriber()
{
var provider = new AzureSpeechStreamingTranscriptionProvider(
Options.Create(new MeetingAssistantOptions
{
AzureSpeech = new AzureSpeechOptions
{
Endpoint = "wss://westeurope.stt.speech.microsoft.com/speech/universal/v2",
Language = "de-DE",
Key = "test-key",
PostProcessingOption = "PostRefinement"
}
}),
NullLogger<AzureSpeechStreamingTranscriptionProvider>.Instance);
var speechConfig = provider.CreateSpeechConfig();
Assert.True(string.IsNullOrEmpty(
speechConfig.GetProperty(PropertyId.SpeechServiceResponse_PostProcessingOption)));
}
[Fact]
public void CreateSpeechConfigDoesNotApplyBlankPostProcessingOption()
{
var provider = new AzureSpeechStreamingTranscriptionProvider(
Options.Create(new MeetingAssistantOptions
{
AzureSpeech = new AzureSpeechOptions
{
Endpoint = "wss://westeurope.stt.speech.microsoft.com/speech/universal/v2",
Language = "de-DE",
Key = "test-key",
PostProcessingOption = " "
}
}),
NullLogger<AzureSpeechStreamingTranscriptionProvider>.Instance);
var speechConfig = provider.CreateSpeechConfig();
Assert.True(string.IsNullOrEmpty(
speechConfig.GetProperty(PropertyId.SpeechServiceResponse_PostProcessingOption)));
}
[Fact]
public void ResolveKeyFallsBackToUserEnvironment()
{
@@ -82,15 +127,17 @@ public sealed class AzureSpeechStreamingTranscriptionProviderTests
}
[Fact]
public void EndpointDefaultsToUniversalV2SpeechEndpointForRegion()
public void CreateSpeechConfigUsesSubscriptionWhenEndpointIsBlank()
{
Assert.Equal(
new Uri("wss://germanywestcentral.stt.speech.microsoft.com/speech/universal/v2"),
AzureSpeechStreamingTranscriptionProvider.GetEndpoint(new AzureSpeechOptions
var speechConfig = AzureSpeechStreamingTranscriptionProvider.CreateSpeechConfig(
new AzureSpeechOptions
{
Endpoint = "",
Region = "germanywestcentral"
}));
Region = "westeurope"
},
"test-key");
Assert.NotNull(speechConfig);
}
[Theory]