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

@@ -0,0 +1,28 @@
using AIStudio.Settings;
namespace AIStudio.Tools.Services.Indexing;
/// <summary>
/// Which transcription provider may hear the audio and video files of a data source.
/// </summary>
/// <param name="Provider">The provider, or null when none may.</param>
/// <param name="IgnoreReason">Why audio and video files without a transcript are left out when no provider may hear them; null when there is a provider.</param>
internal sealed record MediaTranscriptionAvailability(TranscriptionProvider? Provider, DataSourceEmbeddingIgnoreReason? IgnoreReason)
{
/// <summary>
/// No usable transcription provider is configured.
/// </summary>
public static readonly MediaTranscriptionAvailability MISSING = new(null, DataSourceEmbeddingIgnoreReason.TRANSCRIPTION_PROVIDER_MISSING);
/// <summary>
/// The configured transcription provider falls short of the confidence level of the data source.
/// </summary>
public static readonly MediaTranscriptionAvailability NOT_ALLOWED = new(null, DataSourceEmbeddingIgnoreReason.TRANSCRIPTION_PROVIDER_NOT_ALLOWED);
/// <summary>
/// The given provider may hear the media files.
/// </summary>
/// <param name="provider">The provider.</param>
/// <returns>The availability.</returns>
public static MediaTranscriptionAvailability Allowed(TranscriptionProvider provider) => new(provider, null);
}