Public Access
Add meeting assistant speech and summary automation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MeetingAssistant.MeetingNotes;
|
||||
using MeetingAssistant.Transcription;
|
||||
using System.Diagnostics;
|
||||
using System.Text.Json;
|
||||
using YamlDotNet.Serialization;
|
||||
@@ -13,16 +14,21 @@ public sealed class MeetingSummaryTools
|
||||
|
||||
private readonly MeetingSessionArtifacts artifacts;
|
||||
private readonly MeetingAssistantOptions options;
|
||||
private readonly IDictationWordStore? dictationWordStore;
|
||||
|
||||
public MeetingSummaryTools(MeetingSessionArtifacts artifacts)
|
||||
: this(artifacts, new MeetingAssistantOptions())
|
||||
: this(artifacts, new MeetingAssistantOptions(), null)
|
||||
{
|
||||
}
|
||||
|
||||
public MeetingSummaryTools(MeetingSessionArtifacts artifacts, MeetingAssistantOptions options)
|
||||
public MeetingSummaryTools(
|
||||
MeetingSessionArtifacts artifacts,
|
||||
MeetingAssistantOptions options,
|
||||
IDictationWordStore? dictationWordStore = null)
|
||||
{
|
||||
this.artifacts = artifacts;
|
||||
this.options = options;
|
||||
this.dictationWordStore = dictationWordStore;
|
||||
}
|
||||
|
||||
public Task<string> ReadTranscript(int? @from = null, int? to = null)
|
||||
@@ -55,7 +61,23 @@ public sealed class MeetingSummaryTools
|
||||
|
||||
public Task<string> ReadGlossary(int? @from = null, int? to = null)
|
||||
{
|
||||
return ReadIfExistsAsync(VaultPath.Resolve(options.Vault.DictationWordsPath), @from, to);
|
||||
return ReadIfExistsAsync(VaultPath.Resolve(options.Vault, options.Vault.DictationWordsPath), @from, to);
|
||||
}
|
||||
|
||||
public async Task<string> AddDictationWord(string word)
|
||||
{
|
||||
if (dictationWordStore is null)
|
||||
{
|
||||
return "Dictation word store is not available.";
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(word))
|
||||
{
|
||||
return "Refused: word must not be empty.";
|
||||
}
|
||||
|
||||
var words = await dictationWordStore.AddWordAsync(word, CancellationToken.None);
|
||||
return $"Added '{word.Trim()}'. Dictionary now contains {words.Count} word(s).";
|
||||
}
|
||||
|
||||
public async Task<string> WriteSummary(string markdown, string? title = null)
|
||||
@@ -436,7 +458,7 @@ public sealed class MeetingSummaryTools
|
||||
|
||||
private string GetProjectsRoot()
|
||||
{
|
||||
return VaultPath.Resolve(options.Vault.ProjectsFolder);
|
||||
return VaultPath.Resolve(options.Vault, options.Vault.ProjectsFolder);
|
||||
}
|
||||
|
||||
private static async Task<string?> RunRipgrepAsync(
|
||||
|
||||
Reference in New Issue
Block a user