{"_id":"@aizhushou/webspeech","_rev":"5-86b111bcb57e9e00fc7cb483d073b3a2","name":"@aizhushou/webspeech","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@aizhushou/webspeech","version":"1.0.1","author":{"name":"shuaixy@163.com"},"_id":"@aizhushou/webspeech@1.0.1","maintainers":[{"name":"tooweadmin","email":"admin@toowe.com"},{"name":"shaoin","email":"1195951949@qq.com"}],"dist":{"shasum":"3a5a3012b73f9789673776623daf961dd0ae57fd","tarball":"https://registry.npmjs.org/@aizhushou/webspeech/-/webspeech-1.0.1.tgz","fileCount":4,"integrity":"sha512-fgq3Vmdq+3BjCzB0hrnnUmlGdJ6k2mzQuVcP+mu0+uwT/k+Lc5sSjCCgD+s2seDX7iBuKCqC0olcA7kYYlTnSQ==","signatures":[{"sig":"MEYCIQDhNpevGpppgu8D/57nf3qzrBTQ1YzvzsSfPc8MasYG9gIhAPpeI0C61L8pMob9Oj9O8RIRgPApxqGyn7t7vPwAIuwk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6240},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","private":false,"scripts":{"dev":"vite","lint":"eslint src --ext .vue,.js,.ts","build":"vue-tsc && vite build","format":"prettier --write 'src/**/*.{js,ts,vue}'","preview":"vite preview"},"_npmUser":{"name":"tooweadmin","email":"admin@toowe.com"},"_npmVersion":"11.4.2","description":"browser web speech api wrapper","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite-plugin-dts":"^3.9.0"},"_npmOperationalInternal":{"tmp":"tmp/webspeech_1.0.1_1754983371996_0.6683876722236397","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aizhushou/webspeech","version":"1.0.2","author":{"name":"shuaixy@163.com"},"license":"MIT","_id":"@aizhushou/webspeech@1.0.2","maintainers":[{"name":"tooweadmin","email":"admin@toowe.com"},{"name":"shaoin","email":"1195951949@qq.com"}],"dist":{"shasum":"143eb6614135f724f745b1424f47bed801f326ce","tarball":"https://registry.npmjs.org/@aizhushou/webspeech/-/webspeech-1.0.2.tgz","fileCount":4,"integrity":"sha512-bL23CLc9GmvKwN2izp2YZ2lfD3OSDfOb89qXCc4TFtxwLn9C+U8vxtsv+7C9gT/dGNCtFRxk22Y+XF2h4A8pyA==","signatures":[{"sig":"MEYCIQDM5+4UVskEpMChAM4FUTo/3YtAFNjvPMvE7fiuHpn+wQIhAMDwCocSyC6AH460liN3VGogTpN09B5j124X+gn+/ORD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6550},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","private":false,"scripts":{"dev":"vite","lint":"eslint src --ext .vue,.js,.ts","build":"vue-tsc && vite build","format":"prettier --write 'src/**/*.{js,ts,vue}'","preview":"vite preview"},"_npmUser":{"name":"tooweadmin","email":"admin@toowe.com"},"_npmVersion":"11.4.2","description":"browser web speech api wrapper","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite-plugin-dts":"^3.9.0"},"_npmOperationalInternal":{"tmp":"tmp/webspeech_1.0.2_1755046236320_0.874872810903313","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aizhushou/webspeech","private":false,"version":"1.0.3","author":{"name":"shuaixy@163.com"},"description":"browser web speech api wrapper","type":"module","main":"dist/index.js","module":"dist/index.js","publishConfig":{"access":"public"},"scripts":{"dev":"vite","build":"vue-tsc && vite build","preview":"vite preview","lint":"eslint src --ext .vue,.js,.ts","format":"prettier --write 'src/**/*.{js,ts,vue}'"},"license":"MIT","devDependencies":{"vite-plugin-dts":"^3.9.0"},"_id":"@aizhushou/webspeech@1.0.3","types":"./dist/index.d.ts","_nodeVersion":"22.12.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-EZBGCY+Do+0rYO1fZqxEALmRJlLIBzZIqwKAOTyRg/3eW4KkNAXM/kRgzcpeNaKqcfhGzwjYODcqd/77K6z+Hg==","shasum":"1f2476e698bcefe7046e04e5c24a846c30873664","tarball":"https://registry.npmjs.org/@aizhushou/webspeech/-/webspeech-1.0.3.tgz","fileCount":4,"unpackedSize":6540,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEgKwAaCn+ghKs9nzZkUvW65bMNrRGHQnT5Vsn61YBKhAiEAkEI+P/dOV2A7xFmeYZUbGrjT5TRt8WE9R9690X0DSgQ="}]},"_npmUser":{"name":"tooweadmin","email":"admin@toowe.com"},"directories":{},"maintainers":[{"name":"tooweadmin","email":"admin@toowe.com"},{"name":"shaoin","email":"1195951949@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/webspeech_1.0.3_1755070078357_0.10477204660517447"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-12T07:22:51.899Z","modified":"2025-08-13T07:27:58.764Z","1.0.10":"2025-08-12T06:02:49.983Z","1.0.1":"2025-08-12T07:22:52.172Z","1.0.2":"2025-08-13T00:50:36.497Z","1.0.3":"2025-08-13T07:27:58.545Z"},"author":{"name":"shuaixy@163.com"},"license":"MIT","description":"browser web speech api wrapper","maintainers":[{"name":"tooweadmin","email":"admin@toowe.com"},{"name":"shaoin","email":"1195951949@qq.com"}],"readme":"# 基于web speech api的响应式封装\n> Web Speech API是一个浏览器API，允许网页进行语音识别（ASR）和语音合成（TTS）。它分为两个部分：语音识别（Speech Recognition）和语音合成（Speech Synthesis）。本项目提供了对这两个功能的响应式封装，方便在Vue 3中使用。\n### 1、TTS语音合成\n```typescript\nconst speechOutput =  useSpeechSynthesis();\nspeechOutput.speek('Hello, world!'); // 语音合成\nspeechOutput.pause(); // 暂停\nspeechOutput.resume(); // 恢复\nspeechOutput.cancel(); // 取消\nspeechOutput.toggle(); // 切换暂停/恢复\n\nconsole.log(speechOutput.isSupported); // 是否支持语音合成\nconsole.log(speechOutput.isInactive); // 是否处于非活动状态\nconsole.log(speechOutput.isSpeaking); // 是否正在说话\nconsole.log(speechOutput.isPaused); // 是否暂停\nconsole.log(speechOutput.status); // 语音合成状态\nconsole.log(speechOutput.error); // 错误信息\n```\n\n### 2. ASR语音识别\n> 注意：Chrome浏览器需要科学上网才能使用语音识别功能。\n```typescript\nconst speechInput = useSpeechRecognition();\nspeechInput.start(); // 开始语音识别\nspeechInput.stop(); // 停止语音识别\nspeechInput.toggle(); // 切换开始/停止\n\nconsole.log(speechInput.isSupported); // 是否支持语音识别\nconsole.log(speechInput.isInactive); // 是否处于非活动状态\nconsole.log(speechInput.isListening); // 是否正在监听\nconsole.log(speechInput.content); // 识别的内容\nconsole.log(speechInput.interimContent); // 临时识别的内容\nconsole.log(speechInput.status); // 语音识别状态\nconsole.log(speechInput.error); // 错误信息\n```\n","readmeFilename":"README.md"}