
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
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 43 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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.