当前位置:网站首页>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 !
边栏推荐
- Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference
- [转]placement new
- LDAP和SSO集成能实现什么效果?
- Pseudo instruction of arm instruction set
- 单页面开发与多页面开发的优缺点
- 【Leetcode】221. Largest Square
- VGG小卷积代替大卷积 VS 深度可分离卷积
- Visio 2019 uses PJ
- 元宇宙是短炒,还是未来趋势?
- Advantages and disadvantages of single page development and multi page development
猜你喜欢

Promise knowledge

Open source project - (erp+ Hotel + e-commerce) background management system

7-5 complex quaternion operation

导航中,添加边框影响布局的解决方法

Take the web page animation effects that can be used. Don't you come and have a look?

QML first day

VGG小卷积代替大卷积 VS 深度可分离卷积

左右案例+小圆点的轮播图+无时间

Common debugging tools and commands for ROS

Kdd2022 | edge information enhancement graph transformer
随机推荐
点云配准--gicp原理与其在pcl中的使用
LeetCode_字符串_简单_344.反转字符串
Get all IPv4 and IPv6 addresses of this computer
爱可可AI前沿推介(6.12)
MVC mode, encryption, jsonwebtoken
Start with Xiaobai, take the weight parameter from the trained model and draw the histogram
传统的DOM渲染方式?
for in 与Object.keys()的区别
Rust语言学习
Beyondcompare 4 uses PJ
LeetCode_ String_ Simple_ 344. reverse string
[译] Go References - The Go Memory Model | golang官方文档中文翻译之内存模型
Load/store access instruction of arm instruction set (2)
开源项目-(ERP+酒店+电商)后台管理系统
【Leetcode】79. Word search
JS pre parsing, object, new keyword
Longest string without duplicate characters (leetcode 3)
Pytoch notes
左右案例+小圆点的轮播图+无时间
用cloneNode 克隆,解决id问题/方法 深复制和浅复制修改id的方法