GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MilanistaDev/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.

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
VoiceOperationSample.xcodeproj
VoiceOperationSample.xcodeproj
 
 
VoiceOperationSample
VoiceOperationSample
 
 
README.md
README.md
 
 

Repository files navigation

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"

About

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.

Topics

sfspeechrecognizerswiftswiftuiswiftui-examplevoice-commands

Resources

Readme
Activity

Stars

6 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.