Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize WeChat Mini Programs's speech-to-text conversion

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to realize WeChat Mini Programs's speech to text". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The realization of WeChat Mini Programs's speech-to-text conversion

1. WeChat Mini Programs recorded and submitted to the server (the audio format is silk at this time)

2. Convert silk to pcm format (silk/decoder / data/test.silk / data/1.pcm) by using silk-v3-decoder (https://github.com/kn007/silk-v3-decoder))

3. Use ffmpeg to convert 44100 sampling rate mono 16bts pcm file to 16000 sampling rate 16bits bit depth mono pcm file.

Ffmpeg-y-f s16le-ac 1-ar 44100-I test44.pcm-acodec pcm_s16le-f s16le-ac 1-ar 16000 16k.pcm (get the pcm file)

Ffmpeg-y-f s16le-ar 24000-ac 1-I / data/1.pcm-f wav-ar 16000-b ar a 16-ac 1 / data/1.wav (obtain the wav file)

4. Call Baidu api to convert pcm, and you can obtain Baidu converted text.

Note: the sampling rate is very important. Baidu api cannot be converted if it is wrong. It must be 8000 or 16000.

This is the end of the introduction of "how to convert WeChat Mini Programs's voice to text". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report