Bug 453963 - speech to text ffmpeg path not found on MacOS
Summary: speech to text ffmpeg path not found on MacOS
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: 22.04.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-18 00:09 UTC by gar
Modified: 2022-10-03 12:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.08
fritzibaby: Brainstorm+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gar 2022-05-18 00:09:41 UTC
SUMMARY
Speech to text on MacOS not finding path to ffmpeg.

STEPS TO REPRODUCE
Select clip > Speech Editor > Start recognition

OBSERVED RESULT
Reports error: No speech detected with log:
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'

EXPECTED RESULT
Speech recognized :O)

SOFTWARE/OS VERSIONS
macOS: 12.3.1

ADDITIONAL INFORMATION
Determined that when editing the file and adding the folder that ffmpeg is in to the path that it works.
I don't know where the PATH should be set for these scripts, so this probably isn't the ultimate fix, but it got the job done in this case.
1. Edit the file /Applications/kdenlive.app/Contents/Resources/scripts/speechtotext.py
2. Add on around line 18 the following code:
    if sys.platform == 'darwin':
        os.environ["PATH"] += os.pathsep + '/Applications/kdenlive.app/Contents/MacOS'
Comment 1 gar 2022-05-18 00:18:29 UTC
Aha! The same is true for speech.py for transcribing the subtitles.
Comment 2 Jean-Baptiste Mardelle 2022-05-19 11:47:09 UTC
Thanks a lot for your report and solution. This should now be fixed with:
https://invent.kde.org/multimedia/kdenlive/-/commit/1daedc13d52202fcca914fc4e614a30e415e925e