Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Voice Recognition in JavaScript
Search
SAW
March 13, 2024
Programming
0
47
Voice Recognition in JavaScript
A presentation slide of Kyoto.js 21.
SAW
March 13, 2024
Tweet
Share
More Decks by SAW
See All by SAW
Provide/Inject で TypeScript の恩恵を受ける方法
azuki
3
70
GraphQL はいいぞ! ~Laravel で学ぶ GraphQL 入門~
azuki
1
230
OSS contributor への第一歩を踏み出すまでの物語
azuki
1
150
Eloquent で relation を扱う基礎
azuki
0
74
メイキング・オブ・PHPカンファレンス 〜PHPカンファレンス関西2024の運営スタッフが語る舞台裏〜
azuki
0
56
ブラウザでテキストを読み上げる
azuki
0
99
計画性ないけれどノリと勢いだけで地方でも勉強会を開くすゝめ 〜 PHPカンファレンス関西2024 の懇親会 LT のその後 〜
azuki
0
50
GraphQL 入門
azuki
1
91
JavaScript で音声認識を試してみよう
azuki
0
130
Other Decks in Programming
See All in Programming
.NET Aspireのクラウド対応検証: Azureと他環境での実践
ymd65536
1
420
Unlocking Python's Core Magic
leew
0
120
複数プロダクトの技術改善・クラウド移行に向き合うチームのフレキシブルなペア・モブプログラミングの実践 / Flexible Pair Programming And Mob Programming
honyanya
0
210
Memory API: Patterns, Use Cases, and Performance
josepaumard
1
160
CSC509 Lecture 03
javiergs
PRO
0
140
ビット演算の話 / Let's play with bit operations
kaityo256
PRO
4
170
App Router 悲喜交々
quramy
7
380
文化が生産性を作る
jimpei
3
560
Pydantic x Database API:turu-pyの開発
yassun7010
1
560
(Deep|Web) Link support with expo-router
mrtry
0
170
フロントエンドの現在地とこれから
koba04
10
4.5k
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
600
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.4k
Building Adaptive Systems
keathley
38
2.1k
Bash Introduction
62gerente
608
210k
Clear Off the Table
cherdarchuk
91
320k
4 Signs Your Business is Dying
shpigford
180
21k
Being A Developer After 40
akosma
84
590k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
39
2.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Speed Design
sergeychernyshev
22
480
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
7
580
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.3k
Faster Mobile Websites
deanohume
304
30k
Transcript
7PJDF3FDPHOJUJPOJO+BWB4DSJQU ,ZPUPKT 4"8
$(whoami) /BNF4PJDIJSP,BUP "HF /JDLOBNF4"8 NBLFT*5FOHJOFFSDPNNVOJUZIFBUJO,BOTBJBSFB -JWFJO0TBLB(SFXVQJO"JDIJ 9 BLB5XJUUFS !B[VLJ@FBUFS
.ZTUSPOHBSFB8FCBQQMJDBUJPOEFWFMPQNFOU 7VF -BSBWFM 2
7PJDF3FDPHOJUJPOJO+BWB4DSJQU 6TF4QFFDI3FDPHOJUJPO"1* CSPXTFSTBTLVTUPBMMPXUPVTFNJDSPQIPOFBU fi STUVTF 0OMZBWBJMBCMFPO)5514 FYDFQUJPOUIF"1*JTBWBJMBCMFPO)551POlocalhost 3
5IF#BTJD'MPXPG7PJDF3FDPHOJUJPO6TBHF (FOFSBUFBOJOTUBODFPGSpeechRecognition 4UBSUWPJDFSFDPHOJUJPOCZstart()NFUIPE (FUWPJDFJOQVUSFTVMUCZonresult()NFUIPE 4
(FOFSBUJOHBSpeechRecognitionJOTUBODF (FUSpeechRecognitionQSPQFSUZGSPNwindowPCKFDU (FUUIFQSPQFSUZwebkitSpeechRecognitionPO4BGBSJBOE(PPHMF $ISPNF 5 // Get SpeechRecognition property. const
speechRecognition = // Get SpeechRecognition or webkitSpeechRecogntion window.SpeechRecognition || window.webkitSpeechRecognition; const recognition = new speechRecognition();
4UBSU7PJDF3FDPHOJUJPO"OE(FUUIF3FTVMU 4UBSUWPJDFSFDPHOJUJPOCZstart()JOSpeechRecognition 5IFQFSNJTTJPOSFRVJSFEUPVTFNJDSPQIPOFBU fi STUFYFDVUJPO (FUSFTVMUCZonresult()JOSpeechRecognition 4FUBIBOEMFSUPonresult()BSHVNFOU (FUSFTVMUGSPNUIFTUBSHVNFOUJOUIFIBOEMFS 5IFSFTVMUJODMVEFEJOresults[0][0].transcriptJO SpeechRecognitionEvent
6
&YBNQMFPGstart()onresult()*NQMFNFOUBUJPO 7 // begin voice recognition recognition.start(); // get voice
recognition result recognition.onresult((event) => { const { transcript } = event.results[0][0]; console.log(transcript); });
4QFDJGZUIF-BOHVBHFUP3FDPHOJ[F 4QFDJ fi FEUIFMBOHVBHFPOlangQSPQFSUZJOSpeechRecognition 5IFWBMVFPGlangQSPQFSUZJO)5.-PSCSPXTFSMBOHVBHFGPSEFGBVMU 8 recognition.lang = 'ja-JP';
"DUVBM&YBNQMF 8FC"QQUPMFBSO&OHMJTIXPSET XPSLJOQSPHSFTT -PPLBUJNBHFBOETBZUIFXPSEPGUIFJNBHF -FBSOWPDBCVMBSZXJUIJNBHF 6TF4QFFDI3FDPHOJUJPO"1*JOBQQMJDBUJPO BWBJMBCMFUPFYUFOEGPSPUIFSMBOHVBHFT 9
-JNJUBUJPOPG4QFFDI3FDPHOJUJPO"1* 4PNFCSPXTFSTOPUTVQQPSU4QFFDI3FDPHOJUJPO"1* 'JSFGPY &EHF FUD 5ZQFEF fi OJUJPOOPUTVQQPSUFEJO5ZQF4DSJQU /FFEUPEF fi
OFCZPVSTFMWFT PSDBTUwindow as any 1 0
$PODMVTJPO *OUSPEVDFEWPJDFSFDPHOJUJPOJO+BWB4DSJQU 6TF4QFFDI3FDPHOJUJPO"1* 5IFCBTJD fl PXPG4QFFDI3FDPHOJUJPO"1*VTBHF 4UBSUSFDPHOJUJPOCZstart()NFUIPE (FUSFTVMUCZonresult() -JNJUBUJPOPG4QFFDI3FDPHOJUJPO"1* 4PNFCSPXTFSTOPUTVQQPSUFE
5ZQFEF fi OJUJPOOPUTVQQPSUFEJO5ZQF4DSJQU 1 1
5IBOLZPVGPSMJTUFOJOH