iOS framework that enables detecting and handling voice commands using microphone.

Overview

VoiceControlKit

iOS framework that enables detecting and handling voice commands using microphone. Built using Swift with minumum target iOS 14.3.

Features

  • Detects commands of single word, and sentences ("Open", "Show first item details").
  • Can work both online and offline, with extremely fast response time (< 0.5 second).
  • Ability to use different set of commands for each screen.
  • Works without Siri integration. So, users don't have to say "Hey Siri" to detect commands. It's a 100% free style detection.
  • Very simple to configure and use.

Prerequisites

  • macOS Big Sur, or later
  • Xcode 12.3+
  • iPhone device with iOS 14.3+

Install VoiceControlKit (using CocoaPods)

  1. Make sure you have CocoaPods installed.
  2. Update local pod repo using command pod repo update or pod repo update trunk.
  3. Open Terminal from your project folder, and run commad pod init.
  4. Add pod 'VoiceControlKit' inside Podfile, and run pod install.

Configure iOS Project

  1. Open Info.plist and add description for keys NSSpeechRecognitionUsageDescription and NSMicrophoneUsageDescription.
  2. Use VoiceCommandListener and VoiceCommandListenerDelegate in your code (see below example) to detect and handle voice commands.
  3. Test on a real iPhone device (not simulator).
  4. Make sure Siri is enabled on iPhone device from Settings, Siri & Search, Listen for "Hey Siri".

Code Example

import UIKit
import VoiceControlKit

class ViewController: UIViewController, VoiceCommandListenerDelegate {
    // MARK: - Outlets
    @IBOutlet weak var label: UILabel!

    // MARK: - Lifecycle
    override func viewDidLoad() {
        super.viewDidLoad()
    
        let commands = [
            VoiceCommand(text: "Hello"),
            VoiceCommand(text: "Hi"),
            VoiceCommand(text: "How are you"),
        ]
    
        VoiceCommandListener.shared.delegate = self
    
        VoiceCommandListener.shared.start(with: commands, success: {
        
        }, failure: { error in
            print(error.localizedDescription)
        })
    }

    // MARK: - VoiceCommandListenerDelegate
    func voiceCommandListener(_ listener: VoiceCommandListener, detected command: VoiceCommand) {
    
        // Do whatever you want depending on detected command
    
        DispatchQueue.main.async {
            self.label.text = command.text
        }
    }
}
You might also like...
The Amazing Audio Engine is a sophisticated framework for iOS audio applications, built so you don't have to.

Important Notice: The Amazing Audio Engine has been retired. See the announcement here The Amazing Audio Engine The Amazing Audio Engine is a sophisti

iOS framework for the Quiet Modem (data over sound)

QuietModemKit This is the iOS framework for https://github.com/quiet/quiet With this library, you can send data through sound. Live demo: https://quie

A speech recognition framework designed for SwiftUI.
A speech recognition framework designed for SwiftUI.

SwiftSpeech Speech Recognition Made Simple Recognize your user's voice elegantly without having to figure out authorization and audio engines. SwiftSp

Functional DSP / Audio Framework for Swift

Lullaby Lullaby is an audio synthesis framework for Swift that supports both macOS and Linux! It was inspired by other audio environments like FAUST,

M3UKit - A µ framework for parsing m3u files

M3UKit - A µ framework for parsing m3u files

Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture.
Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture.

Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern 🎨 and MVVM architecture 🏗 . Made with love ❤️ by Sameer Nawaz

The DoubanFM for iPhone,using AFN and MPMoviePlayer
The DoubanFM for iPhone,using AFN and MPMoviePlayer

DoubanFM github:@XVXVXXX csdn:@XVXVXXX please open DoubanFM.xcworkspace The DoubanFM for iPhone,using MPMoviePlayer &AFNetworking@AFNetworking/AFNetwo

A real-time, votable, democratized music queue on iPad and iPhone using Spotify
A real-time, votable, democratized music queue on iPad and iPhone using Spotify

Queue'd Music Queue'd is the best way to enjoy music with your friends. Add your favorite songs to a shared music queue at your favorite bars, restaur

MusicPlayer - Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture
MusicPlayer - Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture

Skailer 🎧 Beautiful Music Player app built using SwiftUI to demonstrate Neumorp

Owner
Ahmed Abdelkarim
"Success is a journey, it is not a destination."
Ahmed Abdelkarim
Voice Memos is an audio recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Swift.

VoiceMemos Voice Memos is a voice recorder App for iPhone and iPad that covers some of the new technologies and APIs introduced in iOS 8 written in Sw

Zhouqi Mo 322 Aug 4, 2022
TuningFork is a simple utility for processing microphone input and interpreting pitch, frequency, amplitude, etc.

Overview TuningFork is a simple utility for processing microphone input and interpreting pitch, frequency, amplitude, etc. TuningFork powers the Parti

Comyar Zaheri 419 Dec 23, 2022
Recording Indicator Utility lets you turn off the orange microphone recording indicator light for live events and screencasts.

Recording Indicator Utility Recording Indicator Utility lets you turn off the orange microphone recording indicator light, making it ideal for profess

Tyshawn Cormier 121 Jan 1, 2023
Swift Xcode Project that demonstrates how to set up a microphone input via AudioKit verions 5.

AudioKit Mic Input Swift Xcode Project that demonstrates how to set up a microphone input via AudioKit verions 5. Be sure to plug in headphones in ord

Mark Jeschke 0 Oct 23, 2021
Another is a tweak written in Logos and Objective-C to customize Apple's voice assistant - Siri.

Preview On screeen: In reality: English: Another Allows you to customize Siri. Only for Jailbreak users. Compiling Theos is required to compile the pr

Matthew 3 May 5, 2022
A clone for Apple's Voice Memos app.

VoiceMemosClone A clone for Apple's Voice Memos app. Article on Medium. Please read the article on how I created this project here. License Freely pro

Hassan ElDesouky 159 Dec 26, 2022
A tiny menu bar app detecting the chords of the songs you are listening on iTunes or Spotify.

ChordDetector A tiny menu bar app that listens iTunes and Spotify to detect chords of songs! Demo Features iTunes and Spotify support. Saves up to 20

Cem Olcay 72 Dec 26, 2022
An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.

A simple, intuitive audio framework for iOS and OSX. Deprecated EZAudio has recently been deprecated in favor of AudioKit. However, since some people

Syed Haris Ali 4.9k Jan 2, 2023
MusicKit is a framework and DSL for creating, analyzing, and transforming music in Swift.

MusicKit MusicKit is a framework and DSL for creating, analyzing, and transforming music in Swift. Examples Functional harmony let C5 = Pitch(midi: 72

Ben Guo 591 Oct 18, 2022
SoundManager - A simple framework to load and play sounds in your app.

SoundManager - A simple framework to load and play sounds in your app.

Jonathan Chacón 3 Jan 5, 2022