Skip to content

Instantly share code, notes, and snippets.

@bojidar-bg
Created July 25, 2025 23:47
Show Gist options
  • Save bojidar-bg/16d07eebbbc9c9ea905cef5804222042 to your computer and use it in GitHub Desktop.
Save bojidar-bg/16d07eebbbc9c9ea905cef5804222042 to your computer and use it in GitHub Desktop.
Mass rename script for Subtitle Compose
/*
@name mass-rename Title
@version 1.0
@summary Edit before using! Mass-renames voices in Subtitle Compose.
@author Bojidar Marinov
*/
const s = subtitle.instance();
for(let i = s.linesCount() - 1; i >= 0; i--) {
let line = s.line(i);
line.setRichPrimaryText(line.richPrimaryText()
// ----- Edit from here:
.split("<v old voice>").join("<v new voice>")
.split("<v old voice 2>").join("<v new voice 2>")
// ----- to here
// Repeat the .split(...).join(...) line for all voices as needed
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment