当前位置:网站首页>Problems encountered in generating MP3 from text to speech through iFLYTEK voice API
Problems encountered in generating MP3 from text to speech through iFLYTEK voice API
2022-06-12 12:21:00 【Mountains and seas dream】
Project scenario :
Recently, I encountered a headache in front-end work bug, After consulting the front-end leaders of our studio, they failed to solve the fundamental problem , Finally, it was found that the problem was with the back-end , And it's hard to find . Because of this bug It took me a lot of time , I can't let my hair go gray either, so I just keep a record
Problem description :
Recently, with vue The function of listening to books in a novel , The backend interface calls iFLYTEK voice api The interface of is converted into by reading the chapter mp3 File and store the file path to the corresponding database and access the file . The front end is set to load and store files if you listen to this chapter for the first time , The second time you don't have to load , However, the first time I listened to a book, I always reported that the bytes of the audio file I got were 0 Or not MP3 Errors in documents , After refreshing the page MP3 The file can be played again . So the problem is loading for the first time audio It won't play bug
Cause analysis :
The first listening file accepts bytes as 0, The second refresh can play , I think it takes hundreds of milliseconds for the back-end call interface to transfer files , Asynchronous load failed . Then I did the front end 500 Millisecond timer and then test, but the problem is still not solved . Later, I went to the back end to do api Tests found , When you call api When map3 The file has been generated but the bytes are 0, So the first time you listen to a book, you accept bytes as 0, And its file path access exists . IFLYTEK voice text to voice 8000 byte (2000 Word maximum ) The whole process needs 13 About seconds , therefore 13 Seconds before his file bytes are generated , Therefore, the first time the front end listens to the book to get the file path, the file bytes are 0 Or not MP3 file type
Solution :
Just now, I guess it's a loading problem. I set 500 The millisecond loading time has not been resolved , After knowing the problem this time, I set the timer to 13 second , Then the file can be successfully received , Problem solving !
边栏推荐
- #ifndef#define#endif防止头文件重复包含, 你不是真的懂
- [JS] some handwriting functions: deep copy, bind, debounce, etc
- Common debugging tools and commands for ROS
- Bat interview & advanced, get interview materials at the end of the text
- LeetCode_ String_ Simple_ 344. reverse string
- this的指向
- B. Wall painting (C language)
- Problems encountered in installing canvas and errors encountered in running the project
- The direction of this
- In navigation, the solution of adding borders to affect the layout
猜你喜欢

LeetCode 1037. Effective boomerang (vector cross product)

Is yuancosmos a short-term speculation or a future trend?

7-5 complex quaternion operation

Longest string without duplicate characters (leetcode 3)

ELK搭建指南

Must do skill -- use ffmpeg command to quickly and accurately cut video

QT adds a summary of the problems encountered in the QObject class (you want to use signals and slots) and solves them in person. Error: undefined reference to `vtable for xxxxx (your class name)‘

Ros- resolve error "tf2\u buffer\was not declared in this scope"

Asynchronous path processing

Rust语言学习
随机推荐
Beyondcompare 4 uses PJ
A short guide to SSH port forwarding
IP address management
Cookies and sessions
点击产生4位随机数,验证码设置
Problems encountered in installing canvas and errors encountered in running the project
Promise understanding has used promise to realize picture preloading (sequential loading)
LeetCode_ Binary search_ Medium_ 162. looking for peaks
7-5 complex quaternion operation
Asynchronous path processing
【Leetcode】416. Split equal sum subset
Decision tree of machine learning
BAT面试&高级进阶,文末领取面试资料
树的前序,中序,后序遍历
轻量化---Project
无重复字符的最长字符串(LeetCode 3)
Imx6 uboot add lvds1 display
Open source project - (erp+ Hotel + e-commerce) background management system
golang的channel和条件变量在单生产单消费场景下的性能对比测试
Backtracking, eight queens