Skip to content

Fix Piper Linux espeak symlink#10769

Merged
niksedk merged 1 commit into
SubtitleEdit:mainfrom
Ironship:fix-piper-linux-espeak-symlink
May 4, 2026
Merged

Fix Piper Linux espeak symlink#10769
niksedk merged 1 commit into
SubtitleEdit:mainfrom
Ironship:fix-piper-linux-espeak-symlink

Conversation

@Ironship
Copy link
Copy Markdown
Contributor

@Ironship Ironship commented May 3, 2026

Summary

  • Add the missing Linux Piper symlink for libespeak-ng.so.1 after unpacking Piper.
  • Keep the existing libpiper_phonemize.so.1 symlink behavior and use version-independent *.so.1.* source matching so future Piper archive bumps do not require exact filename updates.
  • Preserve the previous ln -sf style behavior via ln -sfn, so existing or dangling symlinks are replaced instead of blocking setup.
  • Add focused regression tests for the Piper Linux symlink patterns, versioned source discovery, and generated ln -sfn command.

Addresses discussion #10659.

Verification

  • Checked for existing PRs/fixes matching #10659, libespeak-ng.so.1, and Piper symlink wording; did not find an active duplicate.
  • dotnet test .\tests\UI\UITests.csproj -c Debug --no-restore --filter DownloadTtsViewModelTests -v minimal passed: 3/3.
  • dotnet build .\src\ui\UI.csproj -c Debug --no-restore succeeded.
  • dotnet test .\tests\UI\UITests.csproj -c Debug --no-restore -v minimal passed: 127/127.

Notes

  • I verified this on Windows with unit/build tests; the actual symlink creation path is Linux-only and runs after Piper is unpacked.
  • AI assistance was used to identify, implement, and verify this change.

Copilot AI review requested due to automatic review settings May 3, 2026 18:40
@Ironship Ironship force-pushed the fix-piper-linux-espeak-symlink branch from f1a5494 to 258ad66 Compare May 3, 2026 18:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Piper download flow on Linux so the unpacked engine gets the expected shared-library symlinks via .NET file APIs instead of shelling out to ln. It fits into the UI text-to-speech download pipeline by adjusting DownloadTtsViewModel, which prepares the locally installed Piper runtime before the engine is used.

Changes:

  • Added a Linux symlink mapping for libespeak-ng.so.1 alongside the existing libpiper_phonemize.so.1 mapping.
  • Replaced the shell-based symlink creation logic with File.CreateSymbolicLink plus explicit cleanup of existing paths.
  • Added a focused unit test that verifies the Piper Linux symlink mapping contains both expected library entries.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/ui/Features/Video/TextToSpeech/DownloadTts/DownloadTtsViewModel.cs Refactors Linux Piper symlink setup and adds the missing libespeak-ng mapping.
tests/UI/Features/Video/TextToSpeech/DownloadTts/DownloadTtsViewModelTests.cs Adds a regression test that checks the exported Linux symlink mapping.

Comment thread src/ui/Features/Video/TextToSpeech/DownloadTts/DownloadTtsViewModel.cs Outdated
Comment thread src/ui/Features/Video/TextToSpeech/DownloadTts/DownloadTtsViewModel.cs Outdated
Comment thread tests/UI/Features/Video/TextToSpeech/DownloadTts/DownloadTtsViewModelTests.cs Outdated
@Ironship Ironship force-pushed the fix-piper-linux-espeak-symlink branch from 258ad66 to 5681afa Compare May 3, 2026 18:49
@niksedk niksedk merged commit b08fd4a into SubtitleEdit:main May 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants