using MeetingAssistant.MeetingNotes; using MeetingAssistant.Transcription; namespace MeetingAssistant.Speakers; public sealed record SpeakerIdentificationRequest( string AudioPath, MeetingNote MeetingNote, IReadOnlyList Segments, IReadOnlyList? Samples = null, IReadOnlyDictionary? KnownSpeakerMappings = null); public sealed record SpeakerAudioSample( string Speaker, TranscriptionSegment Segment, byte[] WavBytes, double Score); public sealed record SpeakerIdentificationResult( IReadOnlyList Segments, IReadOnlyDictionary SpeakerMappings, IReadOnlyList? AttendeeMatches = null); public sealed record SpeakerIdentityAttendeeMatch( string DisplayName, IReadOnlyList AcceptedNames); public sealed record SpeakerIdentityMatchRequest( string DiarizedSpeaker, byte[] UnknownSnippet, IReadOnlyList Candidates); public sealed record SpeakerIdentityMatchCandidate( int IdentityId, string? CanonicalName, int ReferenceCount, IReadOnlyList Snippets); public sealed record SpeakerIdentityMatch(int IdentityId); public interface ISpeakerIdentityMatcher { Task MatchAsync( SpeakerIdentityMatchRequest request, CancellationToken cancellationToken); } public interface ISpeakerSnippetExtractor { Task ExtractSnippetAsync( string audioPath, IReadOnlyList speakerSegments, CancellationToken cancellationToken); } public interface ISpeakerIdentificationService { Task IdentifyKnownSpeakersAsync( SpeakerIdentificationRequest request, CancellationToken cancellationToken); Task IdentifyFinishedSpeakersAsync( SpeakerIdentificationRequest request, CancellationToken cancellationToken) { return IdentifyKnownSpeakersAsync(request, cancellationToken); } Task ApplySpeakerOverrideAsync( SpeakerIdentificationRequest request, string sourceSpeaker, string targetSpeaker, CancellationToken cancellationToken) { return Task.CompletedTask; } Task DeleteSpeakerIdentityAsync( string identity, CancellationToken cancellationToken) { return Task.CompletedTask; } Task ProcessFinishedTranscriptAsync( SpeakerIdentificationRequest request, CancellationToken cancellationToken); }