Repository navigation
docs: clarify toFile() output files and where prosody options go - #40
Merged
Merged
Conversation
- Fix the metadata example, which called toFile() without the directory argument. - Note that toFile() needs an existing directory and always writes audio.<extension> (and metadata.json), overwriting earlier output. - Note that rate/pitch/volume belong in toStream()/toFile() options; setMetadata() ignores them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
README-only change. I use msedge-tts in a video pipeline and ran into these while building it:
toFile()without the directory.tts.toFile("Hi, how are you?")passes the text asdirPathand leavesinputundefined. It's nowtts.toFile("./tmpfolder", "Hi, how are you?"), matching the "Write to file" example.toFile()output names aren't documented._rawSSMLRequestToFile()always writesaudio.<extension>(andmetadata.jsonwhen boundaries are on) intodirPathand doesn't create the directory, so a missing directory rejects withENOENTand repeated calls overwrite each other. Added a short note and pointed totoStream()for custom file names.setMetadata()is silently ignored. From plain JS it's easy to pass{rate: ...}as the third argument ofsetMetadata(). It gets merged intoMetadataOptionsand never reaches the SSML, so every request renders at the default speed. Added one sentence saying prosody goes totoStream()/toFile().No code changes. Happy to reword or drop any part.
I drafted this with an AI assistant (Claude Code) and checked each statement against
src/MsEdgeTTS.tsandsrc/Prosody.tsonmainbefore submitting.