mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +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);
|
return TranscriptionResult.FromText(transcriptionResponse.Text);
|
||||||
}
|
}
|
||||||
|
catch (OperationCanceledException) when (token.IsCancellationRequested)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
if (this.IsTimeoutException(e, token))
|
if (this.IsTimeoutException(e, token))
|
||||||
|
|||||||
@ -447,6 +447,7 @@ public sealed class MediaTranscriptionService(RustService rustService, SettingsM
|
|||||||
providerSettings.Model);
|
providerSettings.Model);
|
||||||
|
|
||||||
var providerResult = await provider.TranscribeAudioAsync(providerSettings.Model, normalized.Result.OutputPath, settingsManager, operation.Cancellation.Token);
|
var providerResult = await provider.TranscribeAudioAsync(providerSettings.Model, normalized.Result.OutputPath, settingsManager, operation.Cancellation.Token);
|
||||||
|
operation.Cancellation.Token.ThrowIfCancellationRequested();
|
||||||
if (!providerResult.Success)
|
if (!providerResult.Success)
|
||||||
{
|
{
|
||||||
logger.LogWarning("The transcription provider failed for '{MediaPath}': {Diagnostic}", mediaPath, providerResult.ErrorMessage);
|
logger.LogWarning("The transcription provider failed for '{MediaPath}': {Diagnostic}", mediaPath, providerResult.ErrorMessage);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user