How to build a simple app that turns text to m4a files
-
17-01-2021 - |
题
I'm learning Chinese and want a way to quickly generate and save words and phrases to m4a files.
I've managed to do pretty much what I want in terminal, but I can't seem to figure out how to make an app out of it. Here is the code I've used in terminal:
cd ~/Desktop/test
say -o "whateveriwantittosay.m4a" "whateveriwantittosay"
How do I make an shell or Apple script that when opened prompts me for whateveriwantittosay, then creates the file? And maybe even asks me again for a new file.
Thanks!
解决方案
Simple Automator Application :
- Create a new Application
- Add a Ask for text action
- Add a Run a sheel script action
- Select Pass input as Arguments
- Copy the following script (Assuming ~/Desktop/Test exists)
=>
cd ~/Desktop/Test
say -o "$@.m4a" $@
- Save your application. It's ready to use.
不隶属于 apple.stackexchange