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
59
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
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
160
Provide/Inject で TypeScript の恩恵を受ける方法
azuki
3
93
GraphQL はいいぞ! ~Laravel で学ぶ GraphQL 入門~
azuki
1
260
OSS contributor への第一歩を踏み出すまでの物語
azuki
1
200
Eloquent で relation を扱う基礎
azuki
0
110
メイキング・オブ・PHPカンファレンス 〜PHPカンファレンス関西2024の運営スタッフが語る舞台裏〜
azuki
0
77
ブラウザでテキストを読み上げる
azuki
0
120
計画性ないけれどノリと勢いだけで地方でも勉強会を開くすゝめ 〜 PHPカンファレンス関西2024 の懇親会 LT のその後 〜
azuki
0
63
GraphQL 入門
azuki
1
120
Other Decks in Programming
See All in Programming
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
3
280
fs2-io を試してたらバグを見つけて直した話
chencmd
0
240
たのしいparse.y
ydah
3
120
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
460
Zoneless Testing
rainerhahnekamp
0
120
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
790
Beyond ORM
77web
7
880
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Kaigi on Railsに初参加したら、その日にLT登壇が決定した件について
tama50505
0
100
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
450
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
9k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Optimising Largest Contentful Paint
csswizardry
33
3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
The World Runs on Bad Software
bkeepers
PRO
65
11k
YesSQL, Process and Tooling at Scale
rocio
169
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Code Reviewing Like a Champion
maltzj
520
39k
Statistics for Hackers
jakevdp
796
220k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
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