Cannot customize the push voice stream
Describe the bug I am unable to hear clear sound on the device using CustomAudioSource.pushAudio, and it often reports errors
To Reproduce Steps to reproduce the behavior: The audio stream returned by calling TTS byte[] data = new byte[buffer.remaining()]; buffer.get(data); audio = ByteUtils.concat(audio, data); // play tts audio MediaManager bean = ApplicationContextUtil.getBean(MediaManager.class); CustomAudioSource customAudioSource = bean.getCustomAudioSource();
customAudioSource.pushAudio(audio, 16, 16000, 1, 160);
Expected behavior I expect the streaming voice to be played normally
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] macos
- Version [e.g. 22] 15.6.1 (24G90)
Additional context I hope to use WebRTC Java to implement a JavaScript request for Java, and then Java calls ASR, LLM synthesizes TTS speech stream, and then plays it, similar to a robot