generated from tailored/router-template
init videos volcengine
This commit is contained in:
28
src/asr/provider/volcengine/test/asr-bigmodel.ts
Normal file
28
src/asr/provider/volcengine/test/asr-bigmodel.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { AsrWsClient, testStream } from '../asr-ws-big-model-client.ts';
|
||||
import { audioPath, config } from './common.ts';
|
||||
|
||||
// const asr = new AsrWsClient('videos/asr_example.wav');
|
||||
|
||||
// tsx src/asr/provider/volcengine/test/asr-bigmodel.ts
|
||||
const main = async () => {
|
||||
const audioId = '123';
|
||||
const asrClient = new AsrWsClient(audioPath, {
|
||||
appid: config.APP_ID,
|
||||
token: config.TOKEN,
|
||||
streaming: false,
|
||||
});
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
|
||||
return asrClient.execute().then((result) => {
|
||||
return {
|
||||
id: audioId,
|
||||
path: audioPath,
|
||||
result: result,
|
||||
};
|
||||
});
|
||||
};
|
||||
const main2 = async () => {
|
||||
testStream();
|
||||
};
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user