Coder Social home page Coder Social logo

mklement0 / voices Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 4.0 405 KB

macOS CLI for changing the default TTS (text-to-speech) voice and printing information about and speaking text with multiple voices.

Makefile 22.37% Shell 77.63%
cli macos macos-services text-to-speech tts voices

voices's People

Contributors

mklement0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

voices's Issues

Change voice mid text

I'm looking for a way for macOS to read text with multiple voices. I've found you can have pauses on a text with [[slnc 1000]], but there doesn't seem to be a command to select the voice in the same [[voice alex]] sort of way. I've installed this CLI, but I'm not sure what to do now. It doesn't have to be a text file, it could be an Apple Script or whatever gets the job done. Just don't know how to go about it.

`awk` warning

I get the following warning when using, for instance following option -L:

awk: Warnung: Fluchtsequenz »\.« wird wie ein normales ».« behandelt
  • installed globally via NPM
  • path of awk: /usr/local/bin/awk

Ansonsten scheint es bisher den Betrieb nicht zu stören.

Some installed voices are identified as uninstalled

Hello, and thanks for this repo, it's really cool! I'm running macOS 12.0.1, and I'm having trouble getting the macOS service version of switching between default voices to find some downloaded voices. I just downloaded the macOS service to switch between default voices as described in the documentation here, and modified just the one indicated line in ~/.SwitchDefaultVoice-rc so that it now reads

voices=( Fred Kathy )

Like I said, I'm running macOS 12.0.1, so the System Preferences seem to have been shuffled around/renamed a little bit from the "Speech" header referenced in this repo's documentation. If I go to System Preferences > Accessibility > Spoken Content and look through the System Voice dropdown menu, which if I'm not mistaken is where the "Speech" content moved, Fred and Kathy both appear as options:

Screen Shot 2021-11-09 at 10 47 14 PM

Let's say that I've just manually changed the default voice to Kathy. When I use the keyboard shortcut I assigned for the switch default voice command, I get the following error message, read in the Kathy voice:

The action “Run Shell Script” encountered an error: “Print: Entry, "VoiceAttributes:VoiceLocaleIdentifier", Does Not Exist
voices: ERROR: 'Fred' is not an installed voice.”

If I then go to my System Preferences window, manually switch the default voice to Fred, and then rerun the switch default voice command, I get basically the same error message, with the only change being that it tells me in the Fred voice that 'Kathy' is not an installed voice.

However, if I then manually change the default voice to Fred and then change that one line in ~/.SwitchDefaultVoice-rc so that it instead reads

voices=( Fred Monica )

(you can see from my screenshot that Monica is also a voice I have installed on my computer), and rerun the keyboard shortcut command, it correctly says "español" in the Monica voice. But if I then rerun the command again, I get the same error message as earlier about Fred not being installed, just this time read in the Monica voice.

I wasn't sure whether this was somehow a language-based issue, so I tried switching the config file to read

voices=( Chantal Monica )

but once again, switching from a manually-set Chantal to Monica is fine, but not the other way around. So I'm not sure what the pattern is here.

In summary: of the downloaded voices I've tried switching between, trying to automatically switch to Alex, Kathy, Fred, or Chantal throws an error, and automatically switching to Monica works fine. Any ideas as to what might be going on? Not sure whether to blame the new OS or whether that's a red herring here. Thanks for your time!

Siri voice possible?

Hi, this cli tool worked very well on system voices, I've noticed that macOS Siri uses a different voice than system options on some language, and they sounds much better.

My intention was to use that voice as default, use this tool to "forcibly" by-pass and set default language to that. but failed, saying WARNING: 'XXX' is not an installed voice.
(Although on iOS, It's possible by default)

Do you think It's possible to use Siri voice, even from cli?

FTR:
Language I intended to use: Japanese
Available options: Kyoko, Otoya
Siri: O-Ren
dir: /System/Library/Speech/Voices/O-RenSiri.SpeechVoice

List all does not list the users name OSX Sierra

List all does not list the users name OSX Sierra

Is there a command to list all voices and the names of the people such as "alex"?

<prompt>
voices -L -a

ar_SA
cs_CZ
da_DK
de_DE
el_GR
en-scotland
en_AU
en_GB
en_IE
en_IN
en_US
en_ZA
es_AR
es_ES
es_MX
fi_FI
fr_CA
fr_FR
he_IL
hi_IN
hu_HU
id_ID
it_IT
ja_JP
ko_KR
nb_NO
nl_BE
nl_NL
pl_PL
pt_BR
pt_PT
ro_RO
ru_RU
sk_SK
sv_SE
th_TH
tr_TR
zh_CN
zh_HK
zh_TW
<prompt> 
voices alex
Alex                en_US    # Most people recognize me by my voice.
<prompt>
voices en_US
WARNING: 'en_US' is not an installed voice.

Changing default voice doesn't work with Infovox iVox (third party) voices

Hi, the CLI and the service work great when using macOS default voices. I also use the excellent iVox voices.

These voices don't have single word names like 'Alex' and 'Samantha', but have the suffix 'Infovox iVox HQ'.

I changed this line in .SwitchDefaultVoice-rc:

voices=(Ava Xander ‘Zoe Infovox iVox HQ’)

The first two are voices that come with macOS Sierra. Zoe is a Belgian Dutch voice I enjoy listening to when having text read aloud. I tried it with single and double quotes and without quotes, but it whenever the script tries to switch to Zoe, it speaks an error ('Failed to change the default font')

I have the suspicion that this can be easily fixed, but I don't know how. If you want to try this for yourself, you can download a free evaluation version of all Infovox iVox voices from their website.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.