Latest 0.0.1
Homepage https://github.com/tattn/VoiceKit
License MIT
Platforms ios 10.0
Frameworks Foundation, AVFoundation, Speech
Authors

VoiceKit

It’s a toolkit that includes a convenient implementation of voice related.

Installation

Carthage

github "tattn/VoiceKit"

CocoaPods

pod 'VoiceKit'

Feature

Record

let speechRecorder = SpeechRecorder()
try! speechRecorder.record()
speechRecorder.stop()
try! speechRecorder.record(to: .document(filePath: "voice/song.m4a"))
try! speechRecorder.record(to: .temporary(filePath: "voice/song.m4a"))

Play

let speechPlayer = SpeechPlayer()
try! speechPlayer.play { _ in
    print("finished")
}
speechPlayer.stop()
try! speechPlayer.play(url: .web(url: "https://foo.com/song.m4a"))
try! speechPlayer.play(url: .document(filePath: "voice/song.m4a"))

Speech Recognition

let speechRecognizer = SpeechRecognizer(locale: .init(identifier: "ja_JP"))!
try! speechRecognizer.recognize { (text, isFinal, error) in
    if isFinal || error != nil {
        print("finished")
    }
    self.textView.text = text
}
speechRecognizer.stop()

Speech Recognition from an audio file

try! speechRecognizer.recognize(url: .defaultURL) { (text, isFinal, error) in
    if isFinal || error != nil {
        print("finished")
    }
    self.textView.text = text
}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

VoiceKit is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "VoiceKit",
    "version": "0.0.1",
    "summary": "It's a toolkit that includes a convenient implementation of voice related.",
    "description": "It's a toolkit that includes a convenient implementation of voice related.nIt contains SpeechRecorder, SpeechPlayer, SpeechRecognizer and so on...",
    "homepage": "https://github.com/tattn/VoiceKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "git": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tattn/VoiceKit.git",
        "tag": "0.0.1"
    },
    "social_media_url": "https://twitter.com/tanakasan2525",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "Sources/**/*",
    "public_header_files": "Sources/**/*.h",
    "frameworks": [
        "Foundation",
        "AVFoundation",
        "Speech"
    ]
}

Pin It on Pinterest

Share This