feat: wip on implementing gemini analyzer

This commit is contained in:
Stevan Freeborn
2025-07-31 00:10:27 -05:00
parent f6773cb64e
commit d7a953f187
10 changed files with 162 additions and 85 deletions
@@ -4,13 +4,15 @@ internal sealed class DefaultCommand(
IFileSystem fileSystem,
IAnsiConsole console,
IAudioExtractor audioExtractor,
ITranscriber transcriber
ITranscriber transcriber,
ITranscriptAnalyzer transcriptAnalyzer
) : AsyncCommand<DefaultCommand.Settings>
{
private readonly IFileSystem _fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
private readonly IAnsiConsole _console = console ?? throw new ArgumentNullException(nameof(console));
private readonly IAudioExtractor _audioExtractor = audioExtractor ?? throw new ArgumentNullException(nameof(audioExtractor));
private readonly ITranscriber _transcriber = transcriber ?? throw new ArgumentNullException(nameof(transcriber));
private readonly ITranscriptAnalyzer _transcriptAnalyzer = transcriptAnalyzer ?? throw new ArgumentNullException(nameof(transcriptAnalyzer));
internal class Settings : CommandSettings
{
@@ -79,6 +81,15 @@ internal sealed class DefaultCommand(
_console.MarkupLine($"[blue]Transcription completed[/] [green]successfully![/]");
TranscriptAnalysis? analysis = null;
await _console.Status()
.Spinner(Spinner.Known.Dots)
.StartAsync("Analyzing transcript...", async ctx =>
{
analysis = await _transcriptAnalyzer.AnalyzeAsync(transcriptionSegments);
});
return 0;
}
}