mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 17:16:16 -08:00
feat: add WAV format support for audio chunks in artplayer-plugin-asr
- Implemented pcmToWav function to convert PCM audio data to WAV format. - Updated onAudioChunk callback to receive both PCM and WAV buffers. - Modified TypeScript definitions to reflect changes in onAudioChunk parameter and append method.
This commit is contained in:
1 parent
62835bb042
commit
10337ddb1d
6 files changed
+81
-13
No files matched your search
@@ -10,8 +10,8 @@ var art = new Artplayer({
|
||||
interval: 40,
|
||||
sampleRate: 16000,
|
||||
autoHideTimeout: 10000,
|
||||
// Use your AI tool to convert buffer into subtitles
|
||||
onAudioChunk: (buffer) => startAsr(buffer),
|
||||
// Use your AI tool to convert pcm/wav into subtitles
|
||||
onAudioChunk: ({ pcm, wav }) => startAsr(pcm),
|
||||
}),
|
||||
]
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user