Shell script trouble: transcribing files with Whisper

* I use Whisper (https://github.com/openai/whisper) to transcribe audio files.
* The following command works in my terminal:
where (full path) means the actual full path to the command, file, or folder (as context requires).
* When I add an audio file of my own speech to a particular folder, I would like Hazel to run the basic command above on that file.
* I created a rule that matches any audio file added to that folder and runs the following embedded shell script for the shell /bin/zsh:
* That rule fails, with Hazel reporting the following:
Before posting, I checked Hazel's Help and made sure that I enclosed $1 in single quotation marks and used the full path of the command. But still no dice.
Am I doing something obviously wrong?
Thank you in advance for your help.
* The following command works in my terminal:
- Code: Select all
(full path)/whisper '(full path)/new.m4a' --model large --language en --fp16 False -o '(full path)/@dictations'
where (full path) means the actual full path to the command, file, or folder (as context requires).
* When I add an audio file of my own speech to a particular folder, I would like Hazel to run the basic command above on that file.
* I created a rule that matches any audio file added to that folder and runs the following embedded shell script for the shell /bin/zsh:
- Code: Select all
for f in '$1'; do (full path)/whisper f --model large --language en --fp16 False -o '(full path)/@dictations'; done
* That rule fails, with Hazel reporting the following:
- Code: Select all
Shellscript exited with non-successful status code: 1
Before posting, I checked Hazel's Help and made sure that I enclosed $1 in single quotation marks and used the full path of the command. But still no dice.
Am I doing something obviously wrong?
Thank you in advance for your help.