public void SetBackend(TTSBackend backendKind) { _ = Task.Run(() => { BackendLoading = true; var newBackend = CreateBackendFor(backendKind); var oldBackend = this.backend; this.backend = newBackend; BackendLoading = false; oldBackend?.Dispose(); }); }
public VoiceBackendManager(PluginConfiguration config, SharedState sharedState) { this.config = config; this.sharedState = sharedState; this.backend = CreateBackendFor(this.config.Backend); }