63 lines
1.5 KiB
C#
63 lines
1.5 KiB
C#
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 = Toak.Core.Constants.Defaults.WhisperModel);
|
|
}
|
|
|
|
public interface ILlmClient
|
|
{
|
|
Task<string> RefineTextAsync(string rawTranscript, string systemPrompt, string model = Toak.Core.Constants.Defaults.LlmModel);
|
|
IAsyncEnumerable<string> RefineTextStreamAsync(string rawTranscript, string systemPrompt, string model = Toak.Core.Constants.Defaults.LlmModel);
|
|
}
|
|
|
|
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();
|
|
}
|