1
0

feat: Introduce ITranscriptionOrchestrator and related interfaces, refactoring DaemonService and other components to use dependency injection.

This commit is contained in:
2026-02-28 15:36:03 +01:00
parent ac0ac2397b
commit 0577640da9
18 changed files with 356 additions and 175 deletions

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Toak.Configuration;
namespace Toak.Core.Interfaces;
public interface IConfigProvider
{
ToakConfig LoadConfig();
void SaveConfig(ToakConfig config);
}
public interface ISpeechClient
{
Task<string> TranscribeAsync(string filePath, string language = "", string model = "whisper-large-v3-turbo");
}
public interface ILlmClient
{
Task<string> RefineTextAsync(string rawTranscript, string systemPrompt, string model = "openai/gpt-oss-20b");
IAsyncEnumerable<string> RefineTextStreamAsync(string rawTranscript, string systemPrompt, string model = "openai/gpt-oss-20b");
}
public interface IAudioRecorder
{
string GetWavPath();
void StartRecording();
void StopRecording();
}
public interface INotifications
{
void Notify(string title, string message = "");
void PlaySound(string soundPath);
}
public interface ITextInjector
{
Task<string> InjectStreamAsync(IAsyncEnumerable<string> textStream, string backend = "xdotool");
Task InjectTextAsync(string text, string backend = "xdotool");
}
public interface IHistoryManager
{
void SaveEntry(string rawText, string finalText, string? skillUsed, long timeTakenMs);
List<HistoryEntry> LoadHistory();
void ClearHistory();
}
public interface IClipboardManager
{
void Copy(string text);
}
public interface IRecordingStateTracker
{
int? GetRecordingPid();
void SetRecording(int pid);
void ClearRecording();
bool IsRecording();
}