npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

iflytek-speech

v0.1.9

Published

## 组件打包

Readme

江西讯飞语音组件集成文档

组件打包

1、修改package.json文件中的版本

"version": "0.1.2",

2、编译组件

npm run build

3、登录npm,已经登录忽略这步

npm login

4、发布组件

npm publish

组件使用方法

1、安装组件

npm i [email protected]

2、在使用页面添加组件

// 引入组件
import {IflytekSpeech} from 'iflytek-speech'
// 注册组件
components: {
IflytekSpeech
},

3、页面引用组件

  • 如果直接使用IflytekSpeech组件将isShowAudioComp设置成true
  
// 在页面增加组件
// isShowAudioComp 是否显示组件页面元素(文本框和语音图标,本组件是antd组件),如不显示组件则需要自己增加页面元素
// isStartRecording 调用组件方法,true时调用开始语音方法,false时调用结束语音组件
// transmittingVoiceContent 返回语音内容方法

<IflytekSpeech :isShowAudioComp="false" :isStartRecording="isRecording" @transmittingVoiceContent="transmittingVoiceContent"></IflytekSpeech>
  • 如果需要自定义页面元素将isShowAudioComp设置成false

4、自定义页面元素方法

增加页面元素(示例)

<!-- 增加文本框和语音图标,实现相关方法 -->
<a-input size="large"
               @change="getListBySearch"
               v-model:value="keyWord"
               style="width: 75%"
               :placeholder="placeholder">
        <template #addonAfter>
          <AudioOutlined v-if="!isRecording"  @click="handleClick()"/><AudioMutedOutlined  v-if="isRecording"  @click="handleClick()"/>
        </template>
      </a-input>

实现以下方法

// 定义图标切换状态
const isRecording = ref(false)
// 图标切换方法,开始录音和停止录音
const handleClick = () => {
  isRecording.value = !isRecording.value
}
// isShowAudioComp=false时增加这个方法
// message是语音识别参数,将参数赋值给检索框
const transmittingVoiceContent = (msg, code) =>{
      if(code !== 0){
        isRecording.value =  false
        message.error(msg);
      } else {
        this.keyWord = msg
      }

    }