Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6952807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:23:47+00:00 2026-05-27T14:23:47+00:00

I am writing an OS X application which uses NSSpeechSynthesizer to read text to

  • 0

I am writing an OS X application which uses NSSpeechSynthesizer to read text to the user and highlights the word it is reading in the text field (NSTextView). This is done by implementing the speechSynthesizer:willSpeakWord:ofString: method of the NSSpeechSynthesizerDelegate protocol. This method provides the range (NSRange) of the word it is about to speak which I forward to the setSelectedRange method of my NSTextView.

All is well until I stop the reading with the stopSpeaking method. If I set it to read again after this, the ranges provided by speechSynthesizer:willSpeakWord:ofString: seem to be out of sync. It seems that it hesitates calling speechSynthesizer:willSpeakWord:ofString: for a few seconds resulting in the ranges being somewhat behind the speech when it finally does.

I have written a simple application illustrating the issue, which can be found here:
http://dl.dropbox.com/u/12516679/SpeechTest.zip

I hope that someone will look at this code (it really is simple) and either confirm that this indeed seems to be a bug, or (hopefully) tell me what I am doing wrong.

– UPDATE –

It turns out that the problem occurs with non-english voices. I was originally using Ida, which is a Danish voice. I have now tested it with many different voices and I can confirm that it works well with all English voices. However it fell out of sync with Danish, Swedish, Norwegian and Dutch. It probably affects other languages as well, but these are the ones I have tested so far.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:23:48+00:00Added an answer on May 27, 2026 at 2:23 pm

    Ok, I have found the source of the problem and a workaround. It has nothing to do with the language as such, but the fact that most non-English voices in OS X Lion are Nuance voices (made by Nuance Communications). I have confirmed this by testing with English Nuance voices and they indeed have the same problem. It looks like there is something wrong in the api for voices provided by Nuance.
    I have created a workaround for the problem by instantiating a new NSSpeechSynthesizer object after the reading has been stopped. It’s not pretty but it works 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a web application in Rails which uses sqlite. I want the user
I am writing an application for Android, which uses a library SoX. This library
I am writing an application in C which uses both user defined satically linked
I'm writing an application which uses sshj library for SSH connections. User opens Connect
I am writing an application in Django, which uses [year]/[month]/[title-text] in the url to
I am writing an android application which uses C2DM. When a user sends some
I am writing an Android application which uses several 3D models. Such a model
I am currently writing an API and an application which uses the API. I
I'm writing an Android application, which uses AccountManager to get the token. From an
I have an application that I'm writing that uses QtWebkit and OpenSSL which deploys

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.