Speech and VoiceOver on Mac OS X in Russian

    I did something for the iPhone and came across interesting “things.” I quickly adapted these “things” for Mac OS X (for fun), and here’s what happened ... The “Speech” and VoiceOver functionality in Mac OS X in Russian. This may be useful to some. There are many applications, but it all depends on the needs.



    I will break this small article into two parts. One part for ordinary users who just want to install Russian language support in Mac OS X. And for beginner developers, I will tell you how the module works and provide the source codes.

    For regular users

    System requirements:
    • Mac OS X 10.6
    • Internet connection


    Link to the synthesizer:
    http://www.yuriev.info/synth.zip

    Installation

    The ruSynthesizer.SpeechSynthesizer folder must be copied to the
    / Library / Speech / Synthesizers

    folder The Vasilisa.SpeechVoice folder must be copied to the
    / Library / Speech / Voices folder

    If any of the folders is not there, then you need to create it. You can activate Vasilisa in System Preferences> Speech.

    Minuses:
    • Fast Internet connection required
    • Poor sound quality
    • Long texts not voiced


    For beginner developers

    We will not learn and invent anything, but just take the "finished" and sculpt the synthesizer out of it in 5 minutes.

    Microsoft is developing leaps and bounds web service Microsoft Translator (beta). One of the innovations in the second version is the scoring of the text in Russian. We will use this web service.

    We will not study and go into details of Apple’s “Speech Synthesis Manager Reference” and “Speech Synthesis Programming Guide”, but take a ready-made example - SynthesizerAndVoiceExample. This example is in the package Xcode v3.1.4. This package, to get examples from it, can be downloaded from the Apple website. In later versions, Apple deleted all the examples, but posted them on its website (I forgot to put SynthesizerAndVoiceExample).

    I post the already prepared modified project:
    http://www.yuriev.info/ruSynthesizer.zip

    In fact, we just need to slightly modify several methods (literally several lines in each method) in the SynthesizerSimulator.m file of the SynthesizerAndVoiceExample project: The most important changes in the startSpeaking method . We just make a request to the Microsoft web service and get a sound file. Additionally, you need to install your appId when accessing the Microsoft web service. It can be obtained for free at http://www.bing.com/developers/createapp.aspx We change the description of the voice module for the Info-VoiceCF1.plist synthesizer. Change the name, locale and range of spoken characters. The finished file can be taken from the final project http://www.yuriev.info/synth.zip

    - (id)init;
    - (void)startSpeaking:(NSString *)string;
    - (void)stopSpeaking;
    - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)aBool;









    Everything, the basic synthesizer is ready. 5 minutes of work, and someone may find it very useful.

    Also popular now: