Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces functionality to save audio files from offline synced conversations, making their storage consistent with real-time audio. The changes involve importing new utility functions, adding a new function upload_wav_as_audio_chunks to handle WAV file processing and uploading, and integrating this new function into the conversation processing logic for both new and updated conversations. The overall approach seems sound, and the suggested improvement regarding error handling is valid and has been retained.
| except Exception as e: | ||
| print(f"Error uploading audio chunks for conversation {conversation_id}: {e}") |
There was a problem hiding this comment.
Catching a generic Exception can mask unexpected issues and make debugging harder. It's generally better to catch more specific exceptions that you anticipate, such as IOError or wave.Error for file operations, or Exception as a last resort after specific ones. Additionally, using print for error messages is not ideal for production systems; consider using a proper logging mechanism (e.g., Python's logging module) which allows for configurable log levels and destinations.
| except Exception as e: | |
| print(f"Error uploading audio chunks for conversation {conversation_id}: {e}") | |
| except (IOError, wave.Error, Exception) as e: | |
| logging.error(f"Error uploading audio chunks for conversation {conversation_id}: {e}") |
|
@mdmohsin7 Blocking issues before merge: Can you run by AI for @beastoin |
|
Done @beastoin Already tested locally as well (convos get created alongside the audio files stored correctly and playing them back works) |
|
@mdmohsin7 In by AI for @beastoin |
|
Hey @mdmohsin7, sorry about this — we're closing this one as not planned for now. Thanks for putting in the work, appreciate it. |
|
Hey @mdmohsin7 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
But we need this, right now users can't have playback or download audio of conversations that were synced offline because the audio of those conversations isn't stored even if private cloud sync is enabled. Overall playback and download experience is inconsistent because of this issue |
|
Hey 👋 — thanks for putting this together! Before we can review, could you share a quick live demo (screenshot, screen recording, or terminal output) showing this working on your local or dev environment? In the AI era, writing code is the easy part — what really makes a PR stand out is proof that it works end-to-end. A short video or even a screenshot goes a long way in helping reviewers feel confident about merging. Feel free to update this PR whenever you have something to show. Thanks! 🙏 |
Audio files that were synced through offline sync were not being saved (like how realtime audio is saved when save to cloud is on). This PR adds the ability to save the audio files of offline synced conversations