Home

Awesome

npm version license

<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

Contents

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

speak.awf — Alfred 3+ TTS (text-to-speech) workflows

An Alfred workflow that uses macOS's TTS (text-to-speech) feature to speak text aloud, especially for multi-lingual use (macOS allows on-demand download of voices in other languages).
<sup>Note: Use of workflows in Alfred requires the paid Power Pack add-on - an investment well worth making.</sup>

The workflow comes with two distinct feature groups:

Note that both feature groups target active voices; i.e., the set of voices selected for active use in System Preferences.
If you know that a voice is installed, yet it doesn't show up in the workflows, make sure it has a check mark in System Preferences > Dictation & Speech > Text to Speech > Systme Voice > Customize....
This is also where you download additional voices.
You can get there more quickly from either the speak or say keywords with no arguments by pressing ⌥↩ (Option+Return).

Caveats:

<sup>See also: CLI voices, which this workflow uses behind the scenes.</sup>

Speaking the active application's text with a specific voice

This feature group comprises:

This feature is based on the system feature for speaking the active application's text, wrapping it with the ability to speak with a specific voice on demand.

This implies the following, whether you invoke the feature with keyword speak for ad-hoc voice selection or via a dedicated keyboard shortcut:

Note:

Speak specified text with one or more voices

This feature group comprises:

say redisplays itself after speaking so as to facilitate iterative experimentation.

Additionally, using modifier keys alongside (Return) offers additional functionality:

Feature summary

Installation

Prerequisites

Installation from the npm registry

<sup>Note: Even if you don't use Node.js itself: its package manager, npm, works across platforms and is easy to install; try
curl -L http://git.io/n-install | bash</sup>

With Node.js installed, install the package as follows:

[sudo] npm install speak.awf -g

Note:

Manual installation

Customization

Caveat: If you reinstall or upgrade this workflow, your custom keyboard shortcuts and customized keywords are retained, but the following aspects of customization must be performed again:

Customizing the speaking-the-active-application's-text-with-a-specific-voice feature

Customization has two to three parts:

Unless already there right after having installed the workflow, open Alfred 3's Preferences... dialog via Alfred 3's menu-bar icon and locate workflow Speak Active App's Text.

The workflow comes with three predefined hotkey-based definitions, based on preinstalled voices "Alex", "Vicki", and "Victoria" Adapt them to your needs:

To define additional hotkey-triggered voices:

Configuration with a custom system keyboard shortcut

Customizing the speaking-given-text-with-one-or-more-voices feature

To assign a hotkey (global keyboard shortcut) to the feature that invokes say with the text currenctly selected in the active application:

<!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the contents of 'LICENSE.md'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. -->

License

Copyright (c) 2015-2017 Michael Klement mklement0@gmail.com (http://same2u.net), released under the MIT license.

Acknowledgements

This project gratefully depends on the following open-source components, according to the terms of their respective licenses.

npm dependencies below have optional suffixes denoting the type of dependency; the absence of a suffix denotes a required run-time dependency: (D) denotes a development-time-only dependency, (O) an optional dependency, and (P) a peer dependency.

<!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the dependencies from 'package.json'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. -->

npm dependencies

<!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the contents of 'CHANGELOG.md'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. -->

Changelog

Versioning complies with semantic versioning (semver).

<!-- NOTE: An entry template for a new version is automatically added each time `make version` is called. Fill in changes afterwards. -->