Public Access
Prevent sampleless speaker identities
PR and Push Build/Test / build-and-test (push) Successful in 8m38s
PR and Push Build/Test / build-and-test (push) Successful in 8m38s
This commit is contained in:
@@ -327,6 +327,22 @@ public sealed class SpeakerIdentityServiceTests
|
||||
Assert.Contains(saved.Snippets, snippet => snippet.WavBytes.SequenceEqual(new byte[] { 8, 8, 8 }));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SpeakerOverrideDoesNotCreateNamedIdentityWithoutSourceSample()
|
||||
{
|
||||
await using var fixture = await SpeakerIdentityFixture.CreateAsync();
|
||||
var service = fixture.CreateService();
|
||||
var segment = new TranscriptionSegment(TimeSpan.Zero, TimeSpan.FromSeconds(5), "Guest-01", "hello from Sabrina");
|
||||
var request = fixture.CreateRequest(
|
||||
["Sabrina"],
|
||||
[segment],
|
||||
[new SpeakerAudioSample("Guest-01", segment, [8, 8, 8], 95)]);
|
||||
|
||||
await service.ApplySpeakerOverrideAsync(request, "Guest-5", "Sabrina", CancellationToken.None);
|
||||
|
||||
Assert.Empty(await fixture.Context.SpeakerIdentities.ToListAsync());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SpeakerIdentityDeletionRemovesAcceptedNameFromDatabase()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user