yum-slop/TaSTT

Free self-hosted STT for VRChat.

git clone https://git.yummers.dev/yum-slop/TaSTT

yumUsers can now choose custom chatbox texture size in UI3db7723

v0.21.0
745 B25 linesraw
1import argparse
2import libunity
3import sys
4
5def removeAudioSources(path: str):
6    parser = libunity.MulticoreUnityParser()
7    anim = parser.parseFile(path)
8    anchors = set()
9    node = anim.popNodeOfClass("82")
10    while node:
11        print("Killed audio source")
12        anchors.add(node.anchor)
13        node = anim.popNodeOfClass("82")
14    for node in anim.nodes:
15        anim.scrubReferencesByValue(node, values=anchors)
16    with open(path, "w", encoding="utf-8") as f:
17        f.write(libunity.unityYamlToString(anim.nodes))
18
19if __name__ == "__main__":
20    parser = argparse.ArgumentParser()
21    parser.add_argument("--prefab", type=str, help="Path to .prefab file.")
22    args = parser.parse_args()
23
24    removeAudioSources(args.prefab)
25