Latest 0.0.1
Homepage https://github.com/hectr/MRSpeechDispatcher
License MIT
Platforms ios 7.0, requires ARC
Frameworks AVFoundation
Authors

CI Status
Version
License
Platform

MRSpeechDispatcher provides an easy-to-use interface for producing synthesized speech from text on an iOS device:

MRSpeechDispatcher *dispatcher = MRSpeechDispatcher.defaultSpeechDispatcher;
dispatcher.reusedSynthesizer = [[AVSpeechSynthesizer alloc] init];
[dispatcher speechText:@"Now relax." withAnimus:MRSpeechAnimusGlad];
[dispatcher speechText:@"And close your eyes." withAnimus:MRSpeechAnimusRegular];
[dispatcher keepQuiteFor:2];
[dispatcher speechText:@"Well done!" withAnimus:MRSpeechAnimusGlad];
[dispatcher speechText:@"See you the next session!" withAnimus:MRSpeechAnimusHurry];

In the example above the dispatcher enqueues the texts to be spoken by wrapping the produced AVSpeechUtterance instances into MRSpeechUtteranceOperation objects and adding them to its NSOperationQueue.

But MRSpeechUtteranceOperation can also be created and used independently just as any other NSOperation instance:

AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"hello"];
NSOperation *operation = [MRSpeechUtteranceOperation speechOperationWithUtterance:utterance];
[operation start];

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CocoaPods

MRSpeechDispatcher is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MRSpeechDispatcher"

Manually

Perform the following steps:

License

MRSpeechDispatcher is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MRSpeechDispatcher",
    "version": "0.0.1",
    "summary": "Text-to-speech operations dispatcher.",
    "description": "`MRSpeechDispatcher` provides an easy-to-use interface for producing synthesized speech on an iOS device.",
    "homepage": "https://github.com/hectr/MRSpeechDispatcher",
    "license": "MIT",
    "authors": {
        "hectr": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hectr/MRSpeechDispatcher.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "MRSpeechDispatcher",
    "public_header_files": "MRSpeechDispatcher/*.h",
    "frameworks": "AVFoundation",
    "subspecs": [
        {
            "name": "Dispatcher",
            "public_header_files": "MRSpeechDispatcher/MRSpeechDispatcher.h",
            "source_files": "MRSpeechDispatcher/MRSpeechDispatcher.*",
            "dependencies": {
                "MRSpeechDispatcher/Operation": [],
                "MRSpeechDispatcher/Utterance": []
            }
        },
        {
            "name": "Operation",
            "public_header_files": "MRSpeechDispatcher/MRSpeechUtteranceOperation.h",
            "source_files": "MRSpeechDispatcher/MRSpeechUtteranceOperation.*",
            "dependencies": {
                "MROperation": [
                    "~> 0.1.0"
                ]
            }
        },
        {
            "name": "SynthesisVoice",
            "public_header_files": "MRSpeechDispatcher/AVSpeechSynthesisVoice+MRSpeechDispatcher.h",
            "source_files": "MRSpeechDispatcher/AVSpeechSynthesisVoice+MRSpeechDispatcher.*"
        },
        {
            "name": "Utterance",
            "public_header_files": "MRSpeechDispatcher/AVSpeechUtterance+MRSpeechDispatcher.h",
            "source_files": "MRSpeechDispatcher/AVSpeechUtterance+MRSpeechDispatcher.*"
        }
    ]
}

Pin It on Pinterest

Share This