
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
react-native-cn-tts
Advanced tools
目前在TTS方面,iOS内置了对中文语言对支持,但是Android中并没有,需要借助第三方的SDK才可实现,该组件对用途便是为React Native Android提供中文TTS的能力(百度语音提供)。如果你希望你的App在多平台下支持多种语言的TTS,可在该组件的基础上搭配使用:react-native-tts。
npm install react-native-cn-tts
react-native link react-native-cn-tts
要正常使用该组件,需要先注册百度语音,并创建应用以获得授权
//引入module
import cntts from 'react-native-cn-tts'
//注册服务
cntts.init(appID,apiKey,secretKey).then(()=>{
//注册成功
tts.speak('成功了,老铁!');
}).catch((e)=>{
//注册失败
})
FAQs
React Native TTS for Chinese
The npm package react-native-cn-tts receives a total of 51 weekly downloads. As such, react-native-cn-tts popularity was classified as not popular.
We found that react-native-cn-tts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.