Latest 1.0
Homepage https://github.com/obaskanderi/OpusRecorder
License Apache License, Version 2.0
Platforms ios 9.0
Dependencies opus-ios, ogg-ios
Authors

Record microphone input and encode data with opus codec.

Example

// Create a file to store voice recording
let audioFilename = ProcessInfo.processInfo.globallyUniqueString + ".ogg"
let audioFilePath = (NSTemporaryDirectory() as NSString).appendingPathComponent(audioFilename)
let audioURL = URL(fileURLWithPath: audioFilePath, isDirectory: false)

if !FileManager.default.fileExists(atPath: audioFile.path) {
    FileManager.default.createFile(atPath: audioFile.path, contents: nil, attributes: nil)
}

// Start recording
let recorder = OpusRecorder()
recorder.start(audioURL!) { (error: Error) in
    print("Failed to start recording, error: (error)")
}

// Stop recording
recorder.stop()

Installation

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

pod "OpusRecorder"

Author

obaskanderi, [email protected]

License

OpusRecorder is available under the Apache 2.0 license. See the LICENSE file for more info.

Latest podspec

{
    "name": "OpusRecorder",
    "version": "1.0",
    "summary": "A voice recorder that encodes audio using opus codec.",
    "homepage": "https://github.com/obaskanderi/OpusRecorder",
    "license": {
        "type": "Apache License, Version 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "obaskanderi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/obaskanderi/OpusRecorder.git",
        "tag": "1.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "OpusRecorder/Classes/**/*",
    "dependencies": {
        "opus-ios": [
            "~> 1.1.3"
        ],
        "ogg-ios": [
            "~> 1.3.2"
        ]
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This