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
21
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
メイキング・オブ・PHPカンファレンス 〜PHPカンファレンス関西2024の運営スタッフが語る舞台裏〜
azuki
0
37
ブラウザでテキストを読み上げる
azuki
0
49
計画性ないけれどノリと勢いだけで地方でも勉強会を開くすゝめ 〜 PHPカンファレンス関西2024 の懇親会 LT のその後 〜
azuki
0
34
GraphQL 入門
azuki
1
54
JavaScript で音声認識を試してみよう
azuki
0
42
Nuxt で GraphQL のクエリを送信する方法
azuki
2
92
関西の IT 勉強会コミュニティをもっと盛り上げたい!!
azuki
0
64
Postman で GraphQL のクエリを送ってみよう
azuki
0
330
Laravel でモデルの ID を UUID/ULID にする方法
azuki
0
230
Other Decks in Programming
See All in Programming
TypeScriptでもLLMアプリケーション開発 / LLM Application In Typescript
rkaga
5
1.4k
仕様と実装で学ぶOpenTelemetry
drumato
2
1.2k
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
520
Embedding it into Ruby code
soutaro
2
450
欠陥を早期に発見するための Software Engineer in Test とその重要性 / What is Software Engineer in Test and How they works
orgachem
PRO
19
2.5k
Good first issues of TypeProf
mame
4
940
AppRouter Panel Talk
yosuke_furukawa
PRO
1
530
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
1
130
“Seeing Like a Programmer”—Resiliency, Limits, and Moral Hazards in Software Engineering (LambdaConf 2024)
chriskrycho
0
440
Upgrading Legacy to the Latest PHP Version
afilina
PRO
0
100
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
370
ts-morphを使ってコードリプレイスとASTへのハードルを下げる!
nyawach
5
330
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
1
130
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
22
6.5k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.7k
Adopting Sorbet at Scale
ufuk
69
8.6k
Statistics for Hackers
jakevdp
790
220k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Why Our Code Smells
bkeepers
PRO
331
56k
Rails Girls Zürich Keynote
gr2m
91
13k
The Pragmatic Product Professional
lauravandoore
26
5.9k
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