Skip to content

Audio/Sound recorder on iOS with Wave View that allows audio cropping, built in Swift

License

Notifications You must be signed in to change notification settings

rcholic/SwiftySoundRecorder

Repository files navigation

SwiftySoundRecorder

CI Status Version License Platform

Screenshots

![Light Color Theme] (https://s3.postimg.org/j9nktqoyb/Screen_Shot_2016_08_20_at_11_57_53_PM.png) ![Dark Color Theme] (https://s9.postimg.org/osiodktdb/Screen_Shot_2016_08_20_at_11_58_36_PM.png) ![Trimming Audio Clip] (https://s13.postimg.org/6l0g3rop3/Screen_Shot_2016_08_20_at_11_58_57_PM.png)

Example

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

Requirements

Installation

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

pod "SwiftySoundRecorder"

Usage Example

To use the recorder, you need to:

  1. Create an instance of SwiftySoundRecorder:
let recorder = SwiftySoundRecorder()
  1. Options of the recorder:
  • Allow cropping: recorder.allowCropping = true // or false to disallow
  • Set maximum length of duration (in seconds): recorder.maxDuration = 10 // 10 seconds; If not set, the recorder will run forever until user stops it
  • Use the theme colors (.Dark and .Light): recorder.themeType = .Dark //
  1. Implement the delegate methods:
  • doneRecordingDidPress(soundRecorder: SwiftySoundRecorder, audioFilePath: String)
  • cancelRecordingDidPress(soundRecorder: SwiftySoundRecorder)
  1. Present the recorder: presentViewController(recorder, animated: true, completion: nil)

Author

rcholic, [email protected]

License

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

About

Audio/Sound recorder on iOS with Wave View that allows audio cropping, built in Swift

Resources

License

Stars

Watchers

Forks

Packages