I'm writing to ask you a question about NSSpeechSynthesizer. Really it works perfect for me, the only things I saw is strange (to me) is that the available voices are all the premium voices.
NSArray* voices;
voices = [NSpeechSynthesizer availableVoices];
When I print all voices in the array I can see, for instance, Silvia and Paolo, but not Silvia Compact and Paolo Compact.
For the italian language, unfortunately, the premium version have many bugs in their way of speaking that the compact voices haven't. So I'd like to be able to select the Compact version... does anyone of you know how can I make them available?
Thank you very much...
You could use availableVoices, and whenever a voice ends in ".premium" try replacing ".premium" with ".compact". That will only work with voices that the user has installed, but that should be no surprise for the user.
You can set the using the identifier (Alice is the compact Italian voice):
let voiceId : String = "com.apple.ttsbundle.Alice-compact"
speechUtterL1 = AVSpeechUtterance(string: "dì qualcosa in italiano")
speechUtter.voice = AVSpeechSynthesisVoice(identifier: voiceId)
place the voice after the text, for I have seen issues when the voice parameter is set before the utterance.
Related
In Xcode, under Preferences (command+comma), in the Behaviors section, there is an option to "Speak announcement using". This option has a pull down list of women's names. I have tried several women's names, and they all seem to be speaking a (different?) foreign language.
Which woman's name corresponds to English? Or better yet, what is the corresponding language for each name? There are a lot of names for me to sift through.
I'm on macOS Sierra if it makes a difference.
Following up here to save people some time, the en_US voices from say -v ? are:
masculine: Alex, Fred
feminine: Samantha, Victoria
Fred and Victoria have very robotic voices so I would recommend choosing either Alex or Samantha.
You can type: say -v ? in terminal to see the list ov all voices and their languages
Like you've said: Samantha is reading using en_US.
Oh Good Grief! I stumbled upon the right name while writing this question: Samantha.
The reasons I wrote this question was because I was tired of trying out different names looking for English, and I was not being disciplined in changing the name after each build, and I was forgetting my place from my progress yesterday.
In the composing of this question, I chose my next name to test: "Samantha" and sure enough on my next build I heard English. I guess I gave up too early, but it was looking hopeless for a while.
Still, it would be nice if there was a list of corresponding languages to names.
We index apps on the Apple App Store but need to filter out ones with descriptions not written in English.
Our current algorithm fails, though. It fails, for instance, in scoring this game as not written in English when it is.
Here's the boolean method and the regex we use to determine if something is considered English or not:
NonEnglishRegex = /[^\040-\176\u2000-\u206F\u2100-\u214F\u2E00-\u2E7F\u3000-\u303F\u00AE\u2605\u272b-\u272e\s]/
def not_english?(text)
text.gsub(NonEnglishRegex, '').length.to_f / text.length < 0.95
end
Is there a better way? We're using Ruby.
Check out the WhatLanguage gem. Here's a YouTube demo. For instance:
"This is a test".language # => "English"
I have developed a web service specifically for detection the language of a text. It can tell you whether a language is English or not. You can read more about it at http://www.whatlanguage.net/en/api/language_identification_made_easy . If you have questions, please let me know.
I m trying to develop a vxml app to play a welcome prompt with names.
for example "Hello Mr Karthikeyan.. welcome to stackoverflow helpline..."
I want system to voice out the name without spoiling the User Experience..
is there any the possible values for interpret-as/format attribute of < say-as > tag in Nuance Platform? something like ?
There are no say-as or interpret-as attributes that will help with proper names. To fine tune the Text-To-Speech (TTS) engine for proper names you will need to update the TTS dictionary with the names that will be voiced back and the proper pronunciation. Nuance sells some packages that can update their TTS dictionary with a large list of common names.
I am trying to use ime (for hiragana input) in a flex 4 spark combo.
On creation complete I am setting the following.
cbx_text.textInput.imeMode = IMEConversionMode.JAPANESE_HIRAGANA;
And to check, tracing the following:
trace(cbx_text.textInput.enableIME); returns true;
trace(cbx_text.textInput.imeMode); returns JAPANESE_HIRAGANA;
However, when I select the text input and start to type some text I am unable to switch to hiragana.
I can set it to work on a textinput component with no problems.
<s:TextInput imeMode="JAPANESE_HIRAGANA"></s:TextInput>
Has anyone had any experience with this?
Any insights much appreciated.
Although I haven't had any experience with IME, I took a quick look at the documentation : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/IME.html
Can it be that it's not enabled application wise? That, maybe what returns true is only valid for the component you are tracing from?
Obvious questions first:
Are you certain the TextInput is a member of cbx_text? I know this seems silly, but it's best to eliminate the obvious first.
Do you have an IME enabled on your computer? For example, do you regularly type in hiragana on your computer and have the appropriate language pack enabled?
Are you sending the IME the string appropriately? IME.setCompositionString() for windows computers?
Does your OS support the use of IMEs? Linux only supports the following methods:
Capabilities.hasIME
IME.enabled <= Can set or return value.
Try tracing hasIME and see if it's installed. Again, we're shotgunning here – trying to track down any possibility of a problem.
When all else fails, go to the source:
http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_6.html
I'm looking for a library or technique to detect the input language of blocks of text provided by users. Online lookups (like Google translate) won't work for this task as I'm writing an app which must run offline.
Thanks.
Here are two more n-gram-based gems you might want to try. They work offline.
https://github.com/echen/unsupervised-language-identification, optimized for separating english and other languages (has a live demo)
https://github.com/feedbackmine/language_detector, less specialized, will detect more languages. Some languages may need some extra training — I found it to be not precise enough for German text.
For anyone interested, I've found http://rubygems.org/gems/kenwaln-whatlanguage, which is performing excellently.
I'm using CLD which I really like, succinct and easy to use. Give it a try.
A quick demo of WhatLanguage in Ruby:
http://www.youtube.com/watch?v=lNqZ2cqOReo&list=UUJ_3fstMOH-g4yBxtvgAWkw&index=0&feature=plcp