{"record":{"id":"474de09a5234c2d4","repo":"SubtitleEdit/subtitleedit","slug":"process-start-is-not-supported-on-this-platform-474de0","errorCode":null,"errorMessage":"Process.Start() is not supported on this platform.","messagePattern":"Process\\.Start\\(\\) is not supported on this platform\\.","errorType":"exception","errorClass":"PlatformNotSupportedException","httpStatus":null,"severity":"error","filePath":"src/ui/Features/Video/TextToSpeech/Engines/Qwen3TtsCpp.cs","lineNumber":572,"sourceCode":"\n        var voicesFolder = GetSetVoicesFolder();\n        var baseName = Path.GetFileNameWithoutExtension(fileName);\n        var destinationFileName = GetUniqueDestinationFileName(voicesFolder, baseName);\n\n        if (Path.GetExtension(fileName).Equals(\".wav\", StringComparison.OrdinalIgnoreCase))\n        {\n            File.Copy(fileName, destinationFileName, overwrite: false);\n            return true;\n        }\n\n        var process = FfmpegGenerator.ConvertFormat(fileName, destinationFileName);\n        if (OperatingSystem.IsWindows() || OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())\n        {\n            _ = process.Start();\n        }\n        else\n        {\n            throw new PlatformNotSupportedException(\"Process.Start() is not supported on this platform.\");\n        }\n\n        process.WaitForExit();\n\n        return File.Exists(destinationFileName);\n    }\n}\n","sourceCodeStart":554,"sourceCodeEnd":580,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/TextToSpeech/Engines/Qwen3TtsCpp.cs#L554-L580","documentation":"PlatformNotSupportedException thrown by the voice-format conversion helper when the host OS is neither Windows, Linux, nor macOS. The conversion is delegated to ffmpeg via FfmpegGenerator.ConvertFormat, and Process.Start — required to run ffmpeg — is only invoked on the three supported platforms; anything else (e.g. FreeBSD) hits this guard.","triggerScenarios":"Running the app on FreeBSD, a non-standard Linux variant that OperatingSystem.IsLinux() reports as false, or an unsupported mobile/console platform; an older target framework where the OS-gating APIs behave differently.","commonSituations":"Community ports to unsupported OSes; CI on an unusual container base; a misreported platform due to runtime version skew.","solutions":["Run the app on Windows, Linux, or macOS — these are the only supported hosts for the conversion path.","Pre-convert the source audio to a supported format (24 kHz mono WAV) on a supported OS so the in-app ffmpeg step is skipped.","If you maintain a port, replace the guard with a Process.Start path that works on your platform and contribute the change upstream.","Confirm OperatingSystem.IsLinux()/IsMacOS() return true on your host — a runtime bug can mis-classify."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS())\n    throw new PlatformNotSupportedException(\"Process.Start() is not supported on this platform.\");","typeGuard":null,"tryCatchPattern":"try { _ = process.Start(); }\ncatch (PlatformNotSupportedException ex) { Se.LogError(ex); throw; }","preventionTips":["Run only on Windows/Linux/macOS for the conversion path.","Pre-convert audio on a supported OS to skip the in-app ffmpeg step.","Gate the conversion feature behind a platform check in the UI."],"tags":["tts","platform","ffmpeg","csharp"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}