fix: Enable Base64 audio input/output handling for API endpoints #2719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request checklist
The PR has a proper title. Use Semantic Commit Messages.
Make sure this is ready to be merged into the relevant branch.
Ensure you can run the codes you submitted succesfully. These submissions will be prioritized for review:
Fix existing bugs reported by user feedback (or you met);
Introduce more convenient user operations.
PR type
Description
This PR implements essential fixes and extensions to enable robust Base64 audio
data transmission for API endpoints (e.g., infer_convert), directly addressing existing
input failures.
Rationale and Value
This change addresses a critical gap where Base64 handling, despite being implied in API documentation,
was non-functional.
JavaScript running in a browser) to utilize RVC's API, significantly boosting integration
potential. This is already proven utility with the 'Neon Spitch Link' UserScript.
processed correctly as per API expectations, making the feature fully functional as intended
by the API design.
Detailed Changes
This change revolves around resolving input failures and providing a clean output path.
1. Core Logic Fix (modules.py)
2. Path Reliability Fix (audio.py)
globwildcard search inload_audioto successfully resolve temporary audio file paths containing random suffixes, preventing 'file not found' errors.3. WebUI Component Update (infer-web.py)
What will it affect
Screenshot