Comments (5)
PCM数据格式是什么样的?
16bit 还是8bit
from freeswitch-asr.
PCM数据无法转换,能不能指导一下,非常感谢。
from freeswitch-asr.
我想转换成wav,但是好像参数不准确,转换出来的数据不是正常的
from freeswitch-asr.
` /* resample the data */
resamples = samples / 3;
for ( c = 0; c < samples; c += 3 ) {
one_sample = (data[c] + data[c+1] + data[c+2]) / 3;
switch_buffer_write(yyasr->audio_buffer, &one_sample, sizeof(int16_t));
}
yyasr->audio_size += resamples * sizeof(int16_t);
if ( yyasr->audio_size >= globals.audio_buffer_max_size ) {
yyasr->audio_size = globals.audio_buffer_max_size;
switch_set_flag_locked(yyasr, YY_FLAG_SPEECH_TIMEOUT);
return SWITCH_TRUE;
}`
@lionsoul2014 这个什么意思?
from freeswitch-asr.
解决了
int datalen = resamples * sizeof(int16_t); yyasr->audio_size += datalen; switch_buffer_write(yyasr->audio_buffer, data, datalen);
from freeswitch-asr.
Related Issues (4)
- 非常感谢分享!能不能改成自己的语音识别接口 HOT 8
- 大神,最近没更新什么吗? HOT 1
- FREESwich 1.10.5上测试有问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freeswitch-asr.