mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 22:32:14 +00:00
Fixed message when user cancels transcription operation
This commit is contained in:
parent
abffc4aed3
commit
c159875351
@ -1089,6 +1089,10 @@ public abstract class BaseProvider : IProvider, ISecretId
|
||||
|
||||
return TranscriptionResult.FromText(transcriptionResponse.Text);
|
||||
}
|
||||
catch (OperationCanceledException) when (token.IsCancellationRequested)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (this.IsTimeoutException(e, token))
|
||||
|
||||
@ -447,6 +447,7 @@ public sealed class MediaTranscriptionService(RustService rustService, SettingsM
|
||||
providerSettings.Model);
|
||||
|
||||
var providerResult = await provider.TranscribeAudioAsync(providerSettings.Model, normalized.Result.OutputPath, settingsManager, operation.Cancellation.Token);
|
||||
operation.Cancellation.Token.ThrowIfCancellationRequested();
|
||||
if (!providerResult.Success)
|
||||
{
|
||||
logger.LogWarning("The transcription provider failed for '{MediaPath}': {Diagnostic}", mediaPath, providerResult.ErrorMessage);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user