This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "make it black" and change the background color of the view in the frame.

Overview

VoiceOperationSample

This app is a sample app that recognizes specific voice commands such as
"make it red", "make it blue", "make it green", and "make it black" and
change the background color of the view in the frame.
Voice commands are only Japanese in this sample. So partial rewriting is required when using in English.

このアプリは、「赤にして」「青にして」「緑にして」「黒にして」などの特定の音声コマンドを認識して枠内のビューの背景色を変えるサンプルアプリです。

voice

開発環境

  • Xcode 13 以上
  • iOS 14 以上
  • SwiftUI

使い方

  1. 音声認識利用の許可
  2. 許可したら下部のボタンをタップして認識状態に
  3. 特定の音声コマンドを発話
  4. 背景色が変化し認識状態終了

コマンドリスト

変更する場合は enum の VoiceCommandType をいじります。

  • 赤にして
  • 青にして
  • 緑にして
  • 黒にして

技術

このアプリでは SFSpeechRecognizer を利用しています。
認識状態は 1分間の制限があり回数制限もあります。
認識状態が終了するとボタンが緑に戻り再度タップすることで認識状態になります。

SFSpeechRecognizer

連続認識

コメントアウトしていますが,認識状態終了後にすぐ認識状態にできます。
バッテリの減りやパフォーマンスに影響が出る可能性もあります。

変更点は,ボタンタップのトリガーではなく,画面遷移後にすぐ認識状態になります。
音声コマンド発話後一旦終了扱いにはなりますが認識状態に戻ります。
連続して発話することで都度背景色の変更が可能という感じです。

voice2

Contact

Please feel free to contact us if you find a bug or have any feedback.
Suggestions for adding functions and code corrections are also welcome.

let name = "Takuya Aso" 
let email = "milanista224" + "@" + "icloud.com"
let profession = "iOS Engineer"
let location = "Tokyo"
You might also like...
Simple driver app for the GoXlr... On Macos.
Simple driver app for the GoXlr... On Macos.

GoXLR for Mac MacOS application to manage GoXLR without virtual machine. For now, full control and compatibility of the GoXLR are not available on Mac

Guaka - Smart and beautiful POSIX compliant CLI framework for Swift.
Guaka - Smart and beautiful POSIX compliant CLI framework for Swift.

Guaka - Smart and beautiful POSIX compliant CLI framework for Swift. It helps you create modern and familiar CLI apps in the vein of widely used proje

The best command-line tool to install and switch between multiple versions of Xcode.
The best command-line tool to install and switch between multiple versions of Xcode.

The best command-line tool to install and switch between multiple versions of Xcode.

A way to build TUI apps with a layout system and API that's similar to SwiftUI.

terminal-ui A way to build TUI apps with a layout system and API that's similar to SwiftUI. We reimplemented parts of the SwiftUI layout system in the

A powerful command line tool for performing stoichiometry calculations on checmicals and chemical equations.

Stoichiometry Stoichiometry is a powerful command line tool for preforming stoichiometry chemicals and chemical equations. Its subcommands are listed

An extremely simple CLI tool that was created to diagnose and further understand an issue in DriverKit causing kIOHIDOptionsTypeSeizeDevice to behave incorrectly when used in DriverKit system extensions.

IOKitHIDKeyboardTester This tool is NOT useful to, or intended for general users. IOKitHIDKeyboardTester is an extremely simple (one-file!) CLI tool t

A command line tool to easily install and browse Xcode templates

🥾 XTrail A command line tool to easily install and browse Xcode templates. Usage The general invocation syntax for xtrail is as follows: xtrail subc

A library and CLI Utility to manage NVRAM Stuff, written in Swift.

NVRAMKit A Library and CLI Utility to manage NVRAM Stuff, written in Swift. Library Adding Library to Project Simply add this line to the dependencies

A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

Owner
Takuya Aso
サンプル駆動・趣味・個人アプリ開発のアカウントです。1日1コミット目指します。
Takuya Aso
Swift utilities for running commands.

Swift Commands Swift utilities for running commands. The Commands module allows you to take a system command as a string and return the standard outpu

Phil 41 Jan 2, 2023
Command-line commands for Chaqmoq applications

Chaqmoq CLI Installation Swift Download and install Swift Swift Package mkdir MyApp cd MyApp swift package init --type executable // Creates an execut

Chaqmoq 1 Dec 25, 2021
🕳 A simple command line tool to punch hole to reduce disk usage on APFS volume for such as a raw disk image.

HolePunch NAME holepunch -- A simple command line tool to punch hole to reduce disk usage on APFS volume for such as a raw disk image. SYNOPSIS holepu

Yoshimasa Niwa 15 Nov 24, 2022
View Metal GPU information from the command-line.

View Metal GPU information from the command-line.

Kenneth Endfinger 7 Dec 2, 2022
ipatool is a command line tool that allows you to search for iOS apps on the App Store and download a copy of the app package, known as an ipa file.

ipatool is a command line tool that allows you to search for iOS apps on the App Store and download a copy of the app package, known as an ipa file.

Majd Alfhaily 3k Dec 30, 2022
Overlook - A commandline app that will watch your folder and monitor any changes

A commandline app that will watch your folder and monitor any changes. When a change occurs, Overlook will execute (or restart) a command you specify. Overlook is platform independent and will work with anything from writing a README file, to developing a service.

Wess Cope 150 Aug 9, 2022
iOS command-line tool that allows searching and downloading ipa files from the iOS App Store

ipatool for iOS This is a port of Majd Alfhaily's ipatool adapted to run on iOS Build / Installation To build this, make sure you have AppSync install

dan 21 Sep 13, 2022
A command line tool that calls your Xcode Test Plan and creates screenshots of your app automatically.

ShotPlan (WIP) A command line tool that calls your Xcode Test Plan and creates screenshots of your app automatically. ShotPlan will also take care of

Devran Cosmo Uenal 6 Jul 21, 2022
BountyList: An app that lets you see who has how much bounty

BountyList ?? introduction 누구에게 얼마큼의 현상금이 걸려있는지 확인할 수 있는 앱. ⏰ Period 2021.07.04

null 0 Jan 6, 2022
Mac App Store: Embedding a Command Line tool using paths as arguments

Mac App Store: Embedding a Command Line tool using paths as arguments Code snippets to embed a Command Line tool using paths as arguments on the Mac A

Alexandre Colucci 10 Aug 20, 2022