200 Commits Later
I have written over 200 commits on OpenVoiceChat. Here are the key lessons I’ve learned along the way.
Process Level Instead of Object Level
I found it helpful to separate objects from the processes they go through. Abstracting out object-specific code makes the system highly flexible and easier to modify. OpenVoiceChat is built with this principle in mind - all object-level code is abstracted out. This makes supporting new models very straightforward, allowing OVC to improve naturally as models advance.
Managing Complexity
The key is finding the right balance - don’t hide complexity completely, but don’t expose it unnecessarily. Each view of the code should be easy to understand and navigate, while avoiding too many different views that could become confusing. This mainly involves creating well-structured functions and semantically separating code.
More Output/Features with Less Complexity
If we can improve performance through a more complex approach, it's net neutral. Improving while maintaining the same level of complexity is net positive. The goal should be writing more general, simpler code. Moving to an end-to-end learned-search approach should always be the target. For example, replacing VAD-silence with a model. Gradually, each process would be learned end-to-end. Everything would follow the principle of search and learning.Refactoring is cool
While refactoring doesn’t directly add features or fix bugs, it’s crucial for long-term maintainability. It makes both feature additions and bug fixes easier in the future. I always feel better after I’ve cleaned up the codebase.
Areas for Improvement
-
Code Navigation: There’s more indirection than ideal. Understanding the system requires jumping between different parts of the code more than I’d like.
-
Planning: Some components needed rewrites that could have been avoided with better initial planning.
-
Testing: This remains an open question - how can we effectively test these systems?