Conversation
|
|
pydub depends on audioop which was deprecated in Python 3.11 and removed in Python 3.13 |
|
@Bilal-io thanks for the heads up, i decided to opt for LK's audio resampler which uses SoX |
|
@tinalenguyen there is an issue since your last update. I tried to debug it but I am unable to find a solution. The final audio includes the participant's speech but not the agent's TTS. Are you seeing the same issue? |
|
@Bilal-io I can't seem to replicate that problem, are you using the same pipeline setup as the |
|
Yes @tinalenguyen, I am using the same code you shared. Here is a gist |
|
@Bilal-io Thank you for the gist, I was able to replicate the issue and fix it! Let me know if it works now :) |
|
Hey @tinalenguyen thank you for the quick fix. 2- The audio of the agent sounds great when speaking but comes out choppy in the saved file. This is the case even without the change mentioned above. I've attached an audio sample (converted to mp4 to be able to attach here). Not sure if this is related to Livekit itself or your implementation. I appreciate your input audio-sample.mp4 |
|
@Bilal-io Good catch, that approach makes more sense! As for the agent audio, I suspect it's from STT audio cutting in during the agent's speech and not mixing well. I've alleviated it by changing the quality of the resampler to very high:
If the audio still isn't consistent, let me know and I'll look into crossfading/transitioning the audio streams. Thank you again for trying out my work!! |
|
Thank you @tinalenguyen for looking into this. Also, the code you change you had requires invoking the Another issue I faced was with deleting the file due to a deadlock. I had to update the aclose to the following: |
|
@Bilal-io Thank you for the feedback, I ended up rewriting most of it and I think it works way better now. Sorry about the bugs/delay, this must be a sign for me to stop coding at 4 AM.. Let me know what you think, and thanks again!! |
to be reviewed: