Monorepo with centralized build props, npm workspaces, LlamaSharp AI, SQLite/SQLCipher storage, Svelte frontend, and unified smoke tests. Co-Authored-By: Oz <oz-agent@warp.dev>
26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using Journal.Core.Dtos;
|
|
|
|
namespace Journal.Core.Services.Speech;
|
|
|
|
public sealed class DisabledSpeechBridgeService(string provider = "none", string message = "Speech bridge is disabled.") : ISpeechBridgeService
|
|
{
|
|
private readonly string _provider = string.IsNullOrWhiteSpace(provider) ? "none" : provider.Trim();
|
|
private readonly string _message = string.IsNullOrWhiteSpace(message) ? "Speech bridge is disabled." : message.Trim();
|
|
|
|
public Task<SpeechDevicesResultDto> ListDevicesAsync(CancellationToken cancellationToken = default)
|
|
{
|
|
var warning = $"{_message} (provider={_provider})";
|
|
return Task.FromResult(new SpeechDevicesResultDto([], warning));
|
|
}
|
|
|
|
public Task<SpeechTranscribeResultDto> TranscribeAsync(
|
|
SpeechTranscribeRequestDto request,
|
|
CancellationToken cancellationToken = default)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(request);
|
|
var engine = string.IsNullOrWhiteSpace(request.Engine) ? "none" : request.Engine.Trim();
|
|
var warning = $"{_message} (provider={_provider})";
|
|
return Task.FromResult(new SpeechTranscribeResultDto("", engine, warning));
|
|
}
|
|
}
|