All Projects → fulldecent → Fdsoundactivatedrecorder

fulldecent / Fdsoundactivatedrecorder

Licence: mit
Start recording when the user speaks

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Fdsoundactivatedrecorder

KeenASR-Android-PoC
A proof-of-concept app using KeenASR SDK on Android. WE ARE HIRING: https://keenresearch.com/careers.html
Stars: ✭ 21 (-90.75%)
Mutual labels:  voice-commands, voice-recognition, voice-control
Python Ai Assistant
Python AI assistant 🧠
Stars: ✭ 219 (-3.52%)
Mutual labels:  voice-commands, voice-control, voice-recognition
react-native-spokestack
Spokestack: give your React Native app a voice interface!
Stars: ✭ 53 (-76.65%)
Mutual labels:  voice-commands, voice-recognition, voice-control
Caster
Dragonfly-Based Voice Programming and Accessibility Toolkit
Stars: ✭ 242 (+6.61%)
Mutual labels:  voice-commands, voice-control, voice-recognition
Voice datasets
🔊 A comprehensive list of open-source datasets for voice and sound computing (50+ datasets).
Stars: ✭ 494 (+117.62%)
Mutual labels:  voice-commands, voice-control, voice-recognition
VoiceNET.Library
.NET library to easily create Voice Command Control feature.
Stars: ✭ 14 (-93.83%)
Mutual labels:  voice-commands, voice-recognition, voice-control
voice gender detection
♂️♀️ Detect a person's gender from a voice file (90.7% +/- 1.3% accuracy).
Stars: ✭ 51 (-77.53%)
Mutual labels:  voice-commands, voice-recognition, voice-control
Voicemail
🔈 📧 Voice Based Email for (Blinds?)
Stars: ✭ 40 (-82.38%)
Mutual labels:  voice-commands, voice-control, voice-recognition
Rhino
On-device speech-to-intent engine powered by deep learning
Stars: ✭ 406 (+78.85%)
Mutual labels:  voice-commands, voice-control, voice-recognition
Hey Athena Client
Your personal voice assistant
Stars: ✭ 336 (+48.02%)
Mutual labels:  voice-commands, voice-control, voice-recognition
Jarvis
Jarvis.sh is a simple configurable multi-lang assistant.
Stars: ✭ 701 (+208.81%)
Mutual labels:  voice-commands, voice-control, voice-recognition
Voicer
AGI-server voice recognizer for #Asterisk
Stars: ✭ 73 (-67.84%)
Mutual labels:  voice-commands, voice-control, voice-recognition
Sonant X
Small JavaScript synthesizer library
Stars: ✭ 154 (-32.16%)
Mutual labels:  audio, sound
Swiftspeech
A speech recognition framework designed for SwiftUI.
Stars: ✭ 149 (-34.36%)
Mutual labels:  voice-recognition, audio
Img Encode
Encode an image to sound and view it as a spectrogram - turn your images into music
Stars: ✭ 157 (-30.84%)
Mutual labels:  audio, sound
Vuejs Sound Player
▶️ 🎹 🎵 HTML5 <audio> tag sound player UI for Vue.js - supports single, loop, pause/stop modes etc
Stars: ✭ 164 (-27.75%)
Mutual labels:  audio, sound
React Native Sound Player
Play sound file in ReactNative
Stars: ✭ 144 (-36.56%)
Mutual labels:  audio, sound
Ni Media
NI Media is a C++ library for reading and writing audio streams.
Stars: ✭ 158 (-30.4%)
Mutual labels:  audio, sound
Mimium
mimium (MInimal Musical medIUM) a programming language as an infrastructure for sound and music.
Stars: ✭ 212 (-6.61%)
Mutual labels:  audio, sound
Alan Sdk Reactnative
Alan React Native SDK adds a voice assistant or chatbot to your app.
Stars: ✭ 138 (-39.21%)
Mutual labels:  voice-commands, voice-control

FDSoundActivatedRecorder

CI Status Version License Platform Carthage compatible Readme Score

Start recording when the user speaks. All you have to do is tell us when to start listening. Then we wait for an audible noise and start recording. This is mostly useful for user speech input and the "Start talking now" prompt.

🍕 Virtual tip jar: https://amazon.com/hz/wishlist/ls/EE78A23EEGQB

Features

  • You can start recording when sound is detected, or immediately
  • Sound stops recording when the user is done talking
  • Works with ARC and iOS 5+

Installation

Add this to your project using Swift Package Manager. In Xcode that is simply: File > Swift Packages > Add Package Dependency... and you're done. Alternative installation options are shown below for legacy projects.

CocoaPods

If you are already using CocoaPods, just add 'FDSoundActivatedRecorder' to your Podfile then run pod install.

Carthage

If you are already using Carthage, just add to your Cartfile:

github "fulldecent/FDSoundActivatedRecorder" ~> 0.1

Then run carthage update to build the framework and drag the built FDSoundActivatedRecorderframework into your Xcode project.

Usage

First, install by adding pod 'FDSoundActivatedRecorder', '~> 1.0.0' to your Podfile.

Import the project with:

import FDSoundActivatedRecorder

Then begin listening with:

self.recorder = FDSoundActivatedRecorder()
self.recorder.delegate = self
self.recorder.startListening()

A full implementation example is provided in this project.

If your app is in the app store, I would much appreciate if you could add your app to https://www.cocoacontrols.com/controls/fdsoundactivatedrecorder under "Apps using this control" and "I Use This Control".

Regular Recorder

If you want to use it as a regular recorder, without the ability to of trimming the audio.

  1. Begin listening:
self.recorder.startListening()
  1. Begin recording:
self.recorder.startRecording()
  1. Finally, you can stop recording using the following method:
self.recorder.stopAndSaveRecording()

Full API

The full API, from FDSoundActivatedRecorder.swift is copied below:

@objc protocol FDSoundActivatedRecorderDelegate {
    /// A recording was triggered or manually started
    func soundActivatedRecorderDidStartRecording(recorder: FDSoundActivatedRecorder)

    /// No recording has started or been completed after listening for `TOTAL_TIMEOUT_SECONDS`
    func soundActivatedRecorderDidTimeOut(recorder: FDSoundActivatedRecorder)

    /// The recording and/or listening ended and no recording was captured
    func soundActivatedRecorderDidAbort(recorder: FDSoundActivatedRecorder)

    /// A recording was successfully captured
    func soundActivatedRecorderDidFinishRecording(recorder: FDSoundActivatedRecorder, andSaved file: NSURL)
}

class FDSoundActivatedRecorder : NSObject {
    /// A log-scale reading between 0.0 (silent) and 1.0 (loud), nil if not recording
    dynamic var microphoneLevel: Double

    /// Receiver for status updates
    weak var delegate: FDSoundActivatedRecorderDelegate?

    /// Listen and start recording when triggered
    func startListening()

    /// Go back in time and start recording `RISE_TRIGGER_INTERVALS` ago
    func startRecording()

    /// End the recording and send any processed & saved file to `delegate`
    func stopAndSaveRecording()

    /// End any recording or listening and discard any recorded files
    func abort()

    /// This is a PRIVATE method but it must be public because a selector is used in NSTimer (Swift bug)
    func interval()
}

Technical discussion

This library is tuned for human speech detection using Apple retail iOS devices in a quiet or noisy environement. You are welcome to tune the audio detection constants of this program for any special needs you may have. Following is a technical description of how the algorithm works from FDSoundActivatedRecorder.swift.

V               Recording
O             /-----------\
L            /             \Fall
U           /Rise           \
M          /                 \
E  --------                   --------
   Listening                  Done
  • We listen and save audio levels every INTERVAL
  • When several levels exceed the recent moving average by a threshold, we record
  • (The exceeding levels are not included in the moving average)
  • When several levels deceed the recent moving average by a threshold, we stop recording
  • (The deceeding levels are not included in the moving average)

Sponsorship

[ YOUR LOGO HERE]

Please contact [email protected] to discuss adding your company logo above and supporting this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].