Forum Discussion
Itay_Nadir
Dec 23, 2024Copper Contributor
Issues with PSI.bot Service Sample Code: Delays, Recording Problems, and User Experience Concerns
Hello,
I am using the "PSI.bot service" sample code from the documentation for implementing real-time audio and video recording, and I am encountering several issues that impact the performance and user experience.
1. Bot Joining the Call:
- The bot takes a long time to join calls, and in some cases, it doesn't join at all. Is there a way to make the bot join calls more reliably and promptly?
- Can the bot join as an invisible participant rather than appearing as a participant block like others?
2. Recording Issues:
- The bot takes too long to start recording after joining the call. Sometimes it doesn’t record at all unless I toggle my camera on and off.
- The video is saved as a series of images that I have to manually convert into an MP4. Is there a way to directly save recordings as MP4 files instead of images?
- For audio, there’s no direct association with the video frames, so I have to use the audio buffer. This feels redundant and complicates the process.
3. Application Management:
- Currently, I have to manually add the app to each meeting by scrolling through the meeting list and finding the specific meeting. Is there a way to add the bot to my apps, so I can easily turn it on/off for any meeting without this extra step?
I’m looking for ways to stabilize the bot’s behavior and improve the overall user experience. Any guidance or recommendations would be greatly appreciated.
Thank you in advance for your help!
Best regards,
Itay_Nadir
- Nivedipa-MSFT
Microsoft
@Itay_Nadir - To address the issues you're encountering with the "PSI.bot service" sample code for real-time audio and video recording, here are some recommendations and potential solutions:
1. Bot Joining the Call
- Improving Join Reliability and Speed:
- Ensure your bot has the necessary permissions and is configured correctly.
- Optimize the bot's initialization sequence to reduce the time it takes to join calls.
- Use the Microsoft Real-time Media Platform for handling media streams efficiently.
- Implement proper error handling and retries in the bot's join logic to improve reliability.
- Invisible Participant:
- As of now, the bot cannot join as an invisible participant due to platform limitations. The bot will appear as a participant in the call.
2. Recording Issues
- Starting Recording Promptly:
- Make sure the bot's media initialization is done promptly after joining the call.
- Investigate the bot's logs to identify any delays or errors occurring during the recording start process.
- Ensure that the bot's media capabilities are fully initialized before starting the recording.
- Saving Video Directly as MP4:
- Use a library or framework that supports direct encoding of video streams into MP4 format.
- The Real-time Media Platform's API can help with handling media streams more efficiently.
- Associating Audio with Video:
- Use a media processing library that can synchronize audio and video streams.
- Ensure the media streams are properly synchronized before saving them.
3. Application Management
Adding the Bot to Meetings Easily:
- Implement a service that can automatically add the bot to meetings based on certain criteria or triggers.
- Utilize Graph API to manage the bot's participation in meetings programmatically.
Stabilizing Bot Behavior and Improving User Experience
- Error Handling and Logging:
- Implement comprehensive error handling and logging to identify and resolve issues quickly.
- Monitor the bot's performance and behavior in real-time to detect and address problems promptly.
- Testing and Optimization:
- Continuously test the bot in various scenarios to ensure stability and reliability.
- Optimize the bot's code and configuration to handle edge cases and improve performance.
By following these recommendations and leveraging the capabilities of the Real-time Media Platform and Graph API, you can improve the performance, reliability, and user experience of your bot service.
Doc References:
- Improving Join Reliability and Speed: