How can i do this on keybord maestro for mac

how can i do this on keybord maestro for mac

i learn spanish

and i want to have shortcut keyboard

that one shortcut keyboard will choose english text to speech

and different shortcut keyboard will chose spanish text to speech

and i want to have shortcut keyboard

that one shortcut keyboard will choose english text to speech

and different shortcut keyboard will chose spanish text to speech

No idea I'm afraid.

Perhaps if you include on your forum post how you would do this manually, someone there will know how to automate the process. I'm afraid I don't even know how to do it manually.
Peter.

Keyboard Maestro https://www.keyboardmaestro.com/ Editors' Choice Award winner.
Macros for your Mac https://download.keyboardmaestro.com/
Join us on the Keyboard Maestro forum https://forum.keyboardmaestro.com/

In case you want to to switch between a Spanish voice and an English voice, this script looks very promising. With it you can either…

  • switch the default voice on the fly, or
  • just speak the selected text with a specific voice.

If it’s that what you are looking for you could easily integrate it with a KM macro. The author also provides a ready-made Service workflow for each of the tasks (1, 2), which both worked fine in my brief test.

manually
i go to system preferences
and change the default text to speech language

If the script suggested by @Tom doesn't work for you, you can probably make this change using AppleScript. Do an Internet search on "applescript system preferences" and you will find a number of articles that address this.

The problem seems to be that the voice is not accessible via AppleScript. But, @ghy76df455DFR, the two Service workflows (linked in my post above) are functional. You can even use them without KM at all. Just via the Services menu.

PS (edit): Once you found out if one of the Service workflows does what you are looking for, we can work on a KM solution.

@ghy76df455DFR: To install the Service workflows, download them, then double-click each of the downloaded files in your Downloads folder. You will be prompted if you want to open it with Automator or install it. Select “Install”.

The workflows then should be available in your Services menu: