Added transcription of audio and video files to local data sources (#1081)

Co-authored-by: Paul Koudelka <106623909+PaulKoudelka@users.noreply.github.com>
This commit is contained in:
Thorsten SommerandPaul Koudelka authored and GitHub committed 2026-10-18 12:06:15 +02:00
1 parent 8642ce2d81
commit 752f7d828a
82 files changed
+3231 -302

No files matched your search

@@ -1,8 +1,17 @@
namespace AIStudio.Provider;
public sealed record TranscriptionResult(bool Success, string Text, string ErrorMessage = "")
/// <summary>
/// What a transcription provider answered.
/// </summary>
/// <param name="Success">Whether the provider returned a transcript.</param>
/// <param name="Text">The transcript.</param>
/// <param name="ErrorMessage">Why the transcription failed, for the user, when it is known.</param>
/// <param name="FileRejected">Whether the provider refused the media file itself, so that it would refuse the same file again.</param>
public sealed record TranscriptionResult(bool Success, string Text, string ErrorMessage = "", bool FileRejected = false)
{
public static TranscriptionResult FromText(string text) => new(true, text);
public static TranscriptionResult Failure(string errorMessage = "") => new(false, string.Empty, errorMessage);
public static TranscriptionResult Rejection(string errorMessage) => new(false, string.Empty, errorMessage, true);
}