Cleanup resources properly
This commit is contained in:
parent
b227fa4b0d
commit
583165f219
@ -60,6 +60,9 @@ class AudioTranscriptionManager: ObservableObject {
|
||||
}
|
||||
|
||||
let serviceRegistry = TranscriptionServiceRegistry(whisperState: whisperState, modelsDirectory: whisperState.modelsDirectory)
|
||||
defer {
|
||||
serviceRegistry.cleanup()
|
||||
}
|
||||
|
||||
processingPhase = .processingAudio
|
||||
let samples = try await audioProcessor.processAudioToSamples(url)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user