![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
An Alfred 2 workflow that speaks the active application's text with specific voices.
Contents
This project is an Alfred 2 workflow for OS X 10.10+ that speaks the active application's text with a specific voice (not just the default voice) using TTS (text-to-speech synthesis).
Note: Use of workflows in Alfred 2 requires the paid Power Pack add-on - an investment well worth making.
The workflow comes with:
speak [<voice>]
keyword that speaks the active application's text either with the default voice or the specified voice.
Option+Return
.This is particularly useful for multilingual setups: you can define
dedicated keyboard shortcuts to speak with language-specific voices.
For instance, you could have one keyboard shortcut for speaking English texts, and
another for Spanish.
Since this workflow is based on the system feature for speaking the active application's text:
It act as a toggle: invoking a shortcut again while speech is still in progress stops it.
You can, but do not need to select the text to speak - depending on the application,
all text may be spoken implicitly (e.g., in TextEdit.app
), or, in Safari.app
,
Reader view (if available) is automatically activated to read only the text
of interest.
Note:
A side effect of speaking with a given voice is that that voice implicitly
becomes the new default voice.
This means that invoking speech without specifying a voice will from then on
will use that voice by default.
This workflow sends keystrokes behind the scenes to activate the system
feature for speaking the active application's text with the default voice.
For the most part, this works fine, but occasionally, especially under heavy system load, this may fail.
(If you know of a way to invoke this system feature programmatically, do let me know.)
Option+Esc
by default) to tigger speaking.System Preferences
.Dication & Speech
, anchor Text to Speech
, ensure that Speak selected text when the key is pressed
is checked.⌥⎋
(Option+Esc), in place (recommended).
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
With Node.js installed, install the package as follows:
[sudo] npm install speak.awf -g
Note:
sudo
depends on how you installed Node.js and whether you've changed permissions later; if you get an EACCES
error, try again with sudo
.Customization has two to three parts:
Speak selected text when the key is pressed
system feature (not recommended): see the next chapter.Unless already there right after having installed the workflow, open Alfred 2's Preferences...
dialog
via Alfred 2'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:
Hotkey
box:
Hotkey
field and pressing the desired key combination.
⌥1
(Option+1), ⌥2
, ... for the voices of interest.Text
input field , using a voice name as displayed in System Preferences > Dication & Speech > Text to Speech
To define additional hotkey-triggered voices:
Hotkey
box and select Copy
.Paste
- a new, empty Hotkey
box will appear.Run Script
box.Hotkey
box, drag a connection to the new Run Script
box.Hotkey
box as described above.Note that you'll have to do the following every time you reinstall/upgrade the workflow:
Speak Active App's Text
), control-click on it in the list on the left, and select Show in Finder
.toggleSpeaking
in a text editor and follow the instructions at the top of the file.Copyright (c) 2015 Michael Klement mklement0@gmail.com (http://same2u.net), released under the MIT license.
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.
Versioning complies with semantic versioning (semver).
v0.1.6 (2015-11-01):
README.md
corrections.v0.1.5 (2015-10-30):
README.md
update: npm
badge and install instructions added.v0.1.4 (2015-10-30):
v0.1.3 (2015-10-30):
v0.1.2 (2015-10-30):
v0.1.1 (2015-10-30):
README.md
improvements.v0.1.0 (2015-10-30):
FAQs
Alfred 3 workflow for using macOS's text-to-speech features
The npm package speak.awf receives a total of 7 weekly downloads. As such, speak.awf popularity was classified as not popular.
We found that speak.awf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.