MCPcopy Create free account
hub / github.com/modelscope/FunASR / start_file_send

Function start_file_send

runtime/html5/static/main.js:194–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192 //audio_record.play(); //not auto play
193}
194function start_file_send()
195{
196 sampleBuf=new Uint8Array( file_data_array );
197
198 var chunk_size=960; // for asr chunk_size [5, 10, 5]
199
200
201
202
203
204 while(sampleBuf.length>=chunk_size){
205
206 sendBuf=sampleBuf.slice(0,chunk_size);
207 totalsend=totalsend+sampleBuf.length;
208 sampleBuf=sampleBuf.slice(chunk_size,sampleBuf.length);
209 wsconnecter.wsSend(sendBuf);
210
211
212 }
213
214 stop();
215
216
217
218}
219
220
221function on_recoder_mode_change()

Callers 1

getConnStateFunction · 0.70

Calls 1

stopFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…