yum-slop/TaSTT

Free self-hosted STT for VRChat.

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

yumArchive project9fdde29

master
16.8 KiB386 linesraw

TaSTT: A deliciously free STT

Note: This project is archived and unsupported. Please consider these supported alternatives:

TaSTT (pronounced "tasty") is a free speech-to-text tool for VRChat. It uses a GPU-based transcription algorithm to turn your voice into text, then sends it into VRChat via OSC.

To get started, download the latest .zip from the releases page.

Speech-to-text demo

Contents:

  1. Usage and setup
  2. Features
  3. Requirements
  4. Motivation
  5. Design overview
  6. Contributing
  7. Roadmap
  8. Backlog

Made with love by yum_food.

Usage and setup

Download the latest .zip from the releases page.

Please join the discord to share feedback and get technical help.

To build your own package from source, see GUI/README.md.

Basic controls:

  • Short click to toggle transcription.
  • Medium click to hide the text box.
  • Hold to update text box without unlocking from worldspace.
  • Medium click + hold to type using STT.
  • Scale up/down in the radial menu.

Design philosophy

  • All language services are performed on the client. No network hops in the critical path.
  • Priorities (descending order): reliability, latency, accuracy, performance, aesthetics.
  • No telemetry of any kind in the app. github and discord are the only means I have to estimate usage and triage bugs.
  • Permissive licensing. Users should be legally entitled to hack, extend, relicense, and profit from this codebase.

Features

  • Works with the built-in chatbox (usable with public avatars!)
  • Customizable board resolution, up to ridiculous sizes.
  • Lighweight design:
    • Works with VRC native chatbox - works with any avatar without modification
    • Custom textbox requires as few as 65 parameter bits
    • Transcription doesn't destroy your frames in game since VRChat is heavily CPU bound. Performance impact when not speaking is negligible.
  • Performant: uses CTranslate2 inference engine with GPU support and flash-attention
  • Browser source. Use with OBS!
  • Multi-language support.
    • Whisper natively supports transcription in 100 languages.
    • A local translation algorithm (Meta's NLLB) enables translating into 200 other languages with good-ish accuracy (BLEU scores typically around 20-35) and low latency.
  • Customizable:
    • Control button may be set to left/right a/b/joystick.
    • Text filters: lowercase, uppercase, uwu, remove trailing period, profanity censoring.
  • Many optional quality-of-life features:
    • Audio feedback: hear distinct beeps when transcription starts and stops.
    • May also enable in-game noise indicator, to grab others' attention.
  • Custom chatbox features:
    • Free modular avatar prefab available here.
    • Resizable with a blendtree in your radial menu.
    • Locks to world space either when summoned (default) or when done speaking.
    • Unicode variant (supporting e.g. Chinese and Japanese) is available through the app's Unity panel.
  • Privacy-respecting: transcription is done on your GPU, not in the cloud.
  • Hackable.
  • From-scratch implementation.
  • Free as in beer.
  • Free as in freedom.
  • MIT license.

Bad parts

I think that any ethical software project should disclose what sucks about it. Here's what sucks about this project:

  • The app UI looks like trash. Only you will see it, so I don't think this really matters. (Electron rewrite when?)
  • The app is HUGE. This mostly stems from the bundled NVIDIA CUDNN .dll's (~1.0GB) and portable git (~500 MB).
    • NVIDIA's DLLs should be statically linked into ctranslate2. That probably means doing our own build of ctranslate2... yuck.
    • Portable git can probably be stripped down. It includes a full mingw environment responsible for the vast majority of the size, which we almost certainly don't need.
  • The app doesn't start automatically with steamvr (TODO do this)
  • The app starts in a weird state where it's transcribing and doesn't really back off correctly. Press the controller keybind once to stop transcription then again to put it into a normal state.
  • The backend Unity code is pretty gory. (This is largely irrelevant to end users, since end users mostly use the VRC-native chatbox or the modular avatar prefab.) I have a burning disdain for C# so I wrote a scuffed "animator as code" library (libunity.py) in Python. This includes a lot of crazy shit like a multiprocess YAML parser and a ton of macro-like string manipulation/concatenation. We should just use the upstream C# animator as code library.
  • The app doesn't include any version numbers, so debugging version-specific issues can be tough (TODO fix this)

Requirements

System requirements:

  • ~2GB disk space
  • NVIDIA GPU with at least 2GB of spare VRAM.
    • You can run it in CPU mode, but it's really slow and lags you a lot more, so I wouldn't recommend it.
    • I've tested on a 1080 Ti and a 3090 and saw comparable latency.
  • SteamVR.

Avatar resources used by custom chatbox:

  • Tris: 12
  • Material slots: 1
  • Texture memory: 340 KB (English), 130 MB (international)
  • Parameter bits: 65-217 (configurable; more bits == faster paging)
  • Menu slots: 1

Motivation

Many VRChat players choose not to use their mics, but as a practical matter, occasionally have to communicate. I want this to be as simple, efficient, and reliable as possible.

There are existing tools which help here, but they are all imperfect for one reason or another:

  1. RabidCrab's STT costs money and relies on cloud-based transcription. Because of the reliance on cloud-based transcription services, it's typically slower and less reliable than local transcription. However, the accuracy and speed of cloud AI models has improved radically since late 2022, so this is probably the best option if money and privacy don't matter to you.
  2. The in-game text box is not visible in streamer mode, and limits you to one update every ~2 seconds, making it a poor choice for latency-sensitive communication.
  3. KillFrenzy's AvatarText only supports text-to-text. It's an excellent product with high-quality source code, but it lacks integration with a client-side STT engine.
  4. I5UCC's VRCTextboxSTT makes KillFrenzy's AvatarText and Whisper kiss. It's the closest spiritual cousin to this repository. The author has made incredible sustained progress on the problem. Definitely take a look!
  5. VRCWizard's TTS-Voice-Wizard also uses Whisper, but they rely on the C# interface to Const-Me's CUDA-enabled Whisper implementation. This implementation does not support beam search decoding and waits for pauses to segment your voice. Thus it's less accurate and higher latency than this project's transcription engine. It supports more features (like cloud-based TTS), so you might want to check it out.

Why should you pick this project over the alternatives? This project is mature, low-latency (typically 500-1000 ms end-to-end in game under load), reliable, and accurate. There is no network hop to worry about and no subscription to manage. Just download and go.

Design overview

These are the important bits:

  1. TaSTT_template.shader. A simple unlit shader template. Contains the business logic for the shader that shows text in game.
  2. generate_shader.py. Adds parameters and an accessor function to the shader template.
  3. libunity.py. Contains the logic required to generate and manipulate Unity YAML files. Works well enough on YAMLs up to ~40k documents, 1M lines.
  4. libtastt.py. Contains the logic to generate TaSTT-specific Unity files, namely the animations and the animator.
  5. osc_ctrl.py. Sends OSC messages to VRChat, which it dutifully passes along to the generated FX layer.
  6. transcribe_v2.py. Uses OpenAI's whisper neural network to transcribe audio and sends it to the board using osc_ctrl.

Parameters & board indexing

I divide the board into several regions and use a single int parameter, TaSTT_Select, to select the active region. For each byte of data in the active region, I use a float parameter to blend between two animations: one with value 0, and one with value 255.

To support wide character sets, I support 2 bytes per character. This can be configured down to 1 byte per character to save parameter bits.

FX controller design

The FX controller (AKA animator) is pretty simple. There is one layer for each sync parameter (i.e. each character byte). The layer has to work out which region it's in, then write a byte to the correct shader parameter.

One FX layer with 16 regions

From top down, we first check if updating the board is enabled. If no, we stay in the first state. Then we check which region we're in. Finally, we drive a shader parameter to one of 256 possible values using a blendtree.

An 8-bit blendtree

The blendtree trick lets us represent wide character sets efficiently. The number of animations required increases logarithmically with the size of the character set:

(N bytes per character) = ceil(log2(size of character set))
(total animations) =
    (2 animations per byte) *
    (N bytes per character) *
    (M characters per region)

Contributing

Contributions welcome. Send a pull request to this repository.

See GUI/README.md for instructions on building the GUI.

Ping the discord if you need help getting set up.

Roadmap

Milestone 1: STT Personally usable

Status: COMPLETE.

Scope: The speech-to-text may be used by one developer intimately familiar with its inner workings. Environment is not encapsulated.

Completed at commit 8326dee0bf01956.

Milestone 2: STT Generally usable

Status: COMPLETE.

Scope: The speech-to-text is used by at least one user not familiar with its inner workings. Dependency management is mostly handled mechanically. The app can be controlled using a GUI.

Completed at commit 1f15133dd985442, AKA release 0.10.0.

Milestone 3: STT Generally performant

Status: COMPLETE.

Scope: The speech-to-text may be used on resource constrained systems.

I'm looking at Const-Me/Whisper as the transcription backend. I have measured terrible accuracy when using the VAD-segmented transcription path vs. using the file-based non-VAD-segmented transcription path (~15x higher edit distance on the same recording of the Bill of Rights). Beam search has not measurably improved the file-based transcription path. It remains to be seen if VAD segmentation is the failure source, or if it's caused by the inference layer being unable to "second guess" itself (previous transcriptions cannot be edited in the current architecture), or something else.

Completed at commit 1f2e5c6cf16e7e7, AKA release 0.11.2.

Milestone 4: Enable non-VRChat use cases

Status: COMPLETE.

Scope: The speech-to-text may be used as a tool for usecases outside of VRChat.

Streamers could use the STT as an OBS browser source. VR players could use it to type into arbitrary text fields (voice-driven keyboard device). MMO players could also use the voice-driven keyboard (speak -> preview -> rapid commit?) while raiding.

Completed at commit 7a576bcac1c37c3, AKA release 0.13.1.

Milestone 5: Integration into other tools

Status: NOT STARTED.

Scope: Integrate performant client-side transcription into other STT tools.

Once performant client-side transcription is implemented, there is no reason to keep it locked away inside one project. Other projects making different tradeoffs (such as relying on cloud services for TTS) could benefit from this functionality, driving down costs and latency for users. In particular, I think that there is value in integrating with TTS-Voice-Wizard.

TaSTT is about providing performant, commoditized, user-owned STT services. I have no interest in using cloud services to provide any functionality. Instead of extending this project to do that, the best way to spread the love is to partner with (contribute to) projects that do.

Completion

This project will probably reach a stable state and then go into maintenance. The efforts described above are the major milestones I plan to implement. Small features and bugfixes will likely continue in the "completed" state.

Backlog

  1. Better Unity integrations
    1. Port all scripts to Unity-native C# scripts.
    2. Support appending to existing FX layers. DONE
    3. Use VRCSDK to generate FX layer instead of generating the serialized files.
  2. In-game usability features.
    1. Resizing (talk to friends far away). DONE
    2. Basic toggles (hide it when not needed). DONE
    3. World mounting (leave it in a fixed position in world space). DONE
    4. Avatar mounting (attach it to your hand) DONE.
    5. Controller triggers (avoid having to use the radial menu every time you want to speak). DONE
  3. General usability features.
    1. Error detection & correction. DONE
    2. Text-to-text interface. Type in terminal, show in game. DONE
    3. Speech-to-text interface. Speak out loud, show in game. DONE
    4. Translation into non-English. Whisper natively supports translating N languages into English, but not the other way around. DONE
    5. Display text in overlay. Enables (1) lower latency view of TaSTT's transcription state; (2) checking transcriptions ahead of time; (3) checking transcriptions without having to see the board in game.
    6. TTS. Multiple people have requested this. See if there are open source algorithms available; or, figure out how to integrate with
    7. Save UI input fields to config file. Persist across process exit. It's annoying having to re-enter the config every time I use the STT. DONE
    8. Customizable controller bindings. Someone mentioned they use left click to unmute. Let's work around users, not make them change their existing keybinds. DONE
    9. One-click upgrade. Fetch latest stable release, copy over virtual env and UI configs, relaunch.
    10. Browser source for OBS. Blocker: the transcription layer doesn't handle long pauses well. DONE
    11. Test suite. Some long representative transcripts with mechanical word error rate (WER) calculation.
  4. Optimization
    1. Utilize the avatar 3.0 SDK's ability to drive parameters to reduce the total # of parameters (and therefore OSC messages & sync events). Note that the parameter memory usage may not decrease. DONE
    2. Optimize FX layer. We have 14k animations and a 1.2 million line FX layer. Something must be rethought to bring these numbers down. DONE
    3. Implement multicore YAML parsing. This will make working with large animators much more practical. DONE
    4. Transcription engine sleep interval increases exponentially up to 1-2 seconds, then jumps back to a short interval once speech is detected. This should significantly cut down on idle resource consumption. Perhaps there's even a more efficient way to detect the odds that anything is being said, which we could use to gate transcription. DONE
    5. There are ~64k words in the English language. We could encode each word using a 16-bit int. On the other hand, suppose you represented each character using 7 bits per character and transmitted words character-by-character. The average word length is 4.7 characters, and we send ~1 space character per word. Thus the expected bits per word in an optimized version of today's encoding scheme is (5.7 * 7) == 39.9 bits. The other encoding scheme is thus ~2.5 times more efficient. This could be used to significantly speed up sync times. (Thanks, Noppers for the idea!)
    6. Use Const-Me/Whisper for transcription. WON'T DO
    7. Implement beam search in Const-Me/Whisper. WON'T DO
  5. Bugfixes
    1. The whisper STT says "Thank you." when there's no audio? DONE
    2. JP and CN transcription does not work in the GUI due to encoding issues.
  6. Shine
    1. Smooth scrolling.
    2. Infinite scrolling. DONE
    3. Sound indicator, maybe like animal crossing :) DONE
    4. Support texture-based PBR shading DONE
1## TaSTT: A deliciously free STT
2
3Note: This project is archived and unsupported. Please consider these supported
4alternatives:
5
6* [TTS Voice Wizard](https://github.com/VRCWizard/TTS-Voice-Wizard) - free,
7  uses WhisperCPP and optional cloud backends
8* [VRCTextboxStt](https://github.com/I5UCC/VRCTextboxSTT) - free, uses the same
9  self-hosted backend as this tool
10* [RabidCrab's STT](https://vrcstt.com/) - non-free, uses cloud transcription
11
12TaSTT (pronounced "tasty") is a free speech-to-text tool for VRChat. It uses
13[a GPU-based transcription algorithm](https://github.com/openai/whisper) to
14turn your voice into text, then sends it into VRChat via OSC.
15
16To get started, download the latest .zip from [the releases page](https://github.com/yum-food/TaSTT/releases/latest).
17
18[![Speech-to-text demo](https://img.youtube.com/vi/tUO1MXN64Mo/0.jpg)](https://youtube.com/watch?v=tUO1MXN64Mo)
19
20Contents:
21
220. [Usage and setup](#usage-and-setup)
231. [Features](#features)
242. [Requirements](#requirements)
253. [Motivation](#motivation)
264. [Design overview](#design-overview)
275. [Contributing](#contributing)
286. [Roadmap](#Roadmap)
297. [Backlog](#backlog)
30
31Made with love by yum\_food.
32
33## Usage and setup
34
35Download the latest .zip from [the releases page](https://github.com/yum-food/TaSTT/releases/latest).
36
37Please [join the discord](https://discord.gg/YWmCvbCRyn) to share feedback and
38get technical help.
39
40To build your own package from source, see GUI/README.md.
41
42Basic controls:
43* Short click to toggle transcription.
44* Medium click to hide the text box.
45* Hold to update text box without unlocking from worldspace.
46* Medium click + hold to type using STT.
47* Scale up/down in the radial menu.
48
49## Design philosophy
50
51* All language services are performed on the client. No network hops in the
52  critical path.
53* Priorities (descending order): reliability, latency, accuracy, performance,
54  aesthetics.
55* No telemetry of any kind in the app. github and discord are the only means I
56  have to estimate usage and triage bugs.
57* Permissive licensing. Users should be legally entitled to hack, extend,
58  relicense, and profit from this codebase.
59
60## Features
61
62* Works with the built-in chatbox (usable with public avatars!)
63* Customizable board resolution, [up to ridiculous sizes](https://www.youtube.com/watch?v=u5h-ivkwS0M).
64* Lighweight design:
65  * Works with VRC native chatbox - works with any avatar without modification
66  * Custom textbox requires as few as 65 parameter bits
67  * Transcription doesn't destroy your frames in game since VRChat is heavily
68    CPU bound. Performance impact when not speaking is negligible.
69* Performant: uses CTranslate2 inference engine with GPU support and
70  flash-attention
71* Browser source. Use with OBS!
72* Multi-language support.
73  * Whisper natively supports transcription in [100 languages](
74    https://github.com/openai/whisper/blob/main/whisper/tokenizer.py#L10).
75  * A local translation algorithm (Meta's NLLB) enables translating into 200
76    other languages with good-ish accuracy (BLEU scores typically around 20-35)
77    and low latency.
78* Customizable:
79  * Control button may be set to left/right a/b/joystick.
80  * Text filters: lowercase, uppercase, uwu, remove trailing period, profanity
81    censoring.
82* Many optional quality-of-life features:
83  * Audio feedback: hear distinct beeps when transcription starts and stops.
84  * May also enable in-game noise indicator, to grab others' attention.
85* Custom chatbox features:
86  * Free modular avatar prefab available [here](https://yumfood.gumroad.com/l/tastt_modular).
87  * Resizable with a blendtree in your radial menu.
88  * Locks to world space either when summoned (default) or when done speaking.
89  * Unicode variant (supporting e.g. Chinese and Japanese) is available
90    through the app's Unity panel.
91* Privacy-respecting: transcription is done on your GPU, not in the cloud.
92* Hackable.
93* From-scratch implementation.
94* Free as in beer.
95* Free as in freedom.
96* MIT license.
97
98## Bad parts
99
100I think that any ethical software project should disclose what sucks about it.
101Here's what sucks about this project:
102
103* The app UI looks like trash. Only you will see it, so I don't think this
104  really matters. (Electron rewrite when?)
105* The app is HUGE. This mostly stems from the bundled NVIDIA CUDNN .dll's
106  (~1.0GB) and portable git (~500 MB).
107  * NVIDIA's DLLs should be statically linked into ctranslate2. That probably
108    means doing our own build of ctranslate2... yuck.
109  * Portable git can probably be stripped down. It includes a full mingw
110    environment responsible for the vast majority of the size, which we almost
111    certainly don't need.
112* The app doesn't start automatically with steamvr (TODO do this)
113* The app starts in a weird state where it's transcribing and doesn't really
114  back off correctly. Press the controller keybind once to stop transcription
115  then again to put it into a normal state.
116* The backend Unity code is pretty gory. (This is largely irrelevant to end
117  users, since end users mostly use the VRC-native chatbox or the modular
118  avatar prefab.) I have a burning disdain for C# so I wrote a scuffed
119  "animator as code" library (libunity.py) in Python. This includes a lot of
120  crazy shit like a multiprocess YAML parser and a ton of macro-like string
121  manipulation/concatenation. We should just use the upstream C# animator as
122  code library.
123* The app doesn't include any version numbers, so debugging version-specific
124  issues can be tough (TODO fix this)
125
126## Requirements
127
128System requirements:
129
130* ~2GB disk space
131* NVIDIA GPU with at least 2GB of spare VRAM.
132  * You *can* run it in CPU mode, but it's really slow and lags you a
133    lot more, so I wouldn't recommend it.
134  * I've tested on a 1080 Ti and a 3090 and saw comparable latency.
135* SteamVR.
136
137Avatar resources used by custom chatbox:
138
139* Tris: 12
140* Material slots: 1
141* Texture memory: 340 KB (English), 130 MB (international)
142* Parameter bits: 65-217 (configurable; more bits == faster paging)
143* Menu slots: 1
144
145## Motivation
146
147Many VRChat players choose not to use their mics, but as a practical matter,
148occasionally have to communicate. I want this to be as simple, efficient, and
149reliable as possible.
150
151There are existing tools which help here, but they are all imperfect for one
152reason or another:
153
1541. RabidCrab's STT costs money and relies on cloud-based transcription.
155   Because of the reliance on cloud-based transcription services, it's
156   typically slower and less reliable than local transcription. However, the
157   accuracy and speed of cloud AI models has improved radically since late
158   2022, so this is probably the best option if money and privacy don't matter
159   to you.
1602. The in-game text box is not visible in streamer mode, and limits you to one
161   update every ~2 seconds, making it a poor choice for latency-sensitive
162   communication.
1633. [KillFrenzy's AvatarText](https://github.com/killfrenzy96/KillFrenzyAvatarText)
164   only supports text-to-text. It's an excellent product with high-quality
165   source code, but it lacks integration with a client-side STT engine.
1664. [I5UCC's VRCTextboxSTT](https://github.com/I5UCC/VRCTextboxSTT) makes
167   KillFrenzy's AvatarText and Whisper kiss. It's the closest spiritual cousin
168   to this repository. The author has made incredible sustained progress on
169   the problem. Definitely take a look!
1705. [VRCWizard's TTS-Voice-Wizard](https://github.com/VRCWizard/TTS-Voice-Wizard)
171   also uses Whisper, but they rely on the C# interface to Const-Me's
172   CUDA-enabled Whisper implementation. This implementation does not support
173   beam search decoding and waits for pauses to segment your voice. Thus it's
174   less accurate and higher latency than this project's
175   transcription engine. It supports more features
176   (like cloud-based TTS), so you might want to check it out.
177
178Why should you pick this project over the alternatives? This project is mature,
179low-latency (typically 500-1000 ms end-to-end in game under load), reliable, and
180accurate. There is no network hop to worry about and no subscription to manage.
181Just download and go.
182
183## Design overview
184
185These are the important bits:
186
1871. `TaSTT_template.shader`. A simple unlit shader template. Contains the
188   business logic for the shader that shows text in game.
1892. `generate_shader.py`. Adds parameters and an accessor function to the
190   shader template.
1913. `libunity.py`. Contains the logic required to generate and manipulate Unity
192   YAML files. Works well enough on YAMLs up to ~40k documents, 1M lines.
1934. `libtastt.py`. Contains the logic to generate TaSTT-specific Unity files,
194   namely the animations and the animator.
1955. `osc_ctrl.py`. Sends OSC messages to VRChat, which it dutifully passes along
196   to the generated FX layer.
1976. `transcribe_v2.py`. Uses OpenAI's whisper neural network to transcribe audio
198   and sends it to the board using osc_ctrl.
199
200#### Parameters & board indexing
201
202I divide the board into several regions and use a single int parameter,
203`TaSTT_Select`, to select the active region. For each byte of data
204in the active region, I use a float parameter to blend between two
205animations: one with value 0, and one with value 255.
206
207To support wide character sets, I support 2 bytes per character. This
208can be configured down to 1 byte per character to save parameter bits.
209
210#### FX controller design
211
212The FX controller (AKA animator) is pretty simple. There is one layer for each
213sync parameter (i.e. each character byte). The layer has to work out which
214region it's in, then write a byte to the correct shader parameter.
215
216![One FX layer with 16 regions](Images/tastt_anim.png)
217
218From top down, we first check if updating the board is enabled. If no, we stay
219in the first state. Then we check which region we're in. Finally, we drive a
220shader parameter to one of 256 possible values using a blendtree.
221
222![An 8-bit blendtree](Images/tastt_blend.png)
223
224The blendtree trick lets us represent wide character sets efficiently. The
225number of animations required increases logarithmically with the size of the
226character set:
227
228```
229(N bytes per character) = ceil(log2(size of character set))
230(total animations) =
231    (2 animations per byte) *
232    (N bytes per character) *
233    (M characters per region)
234```
235
236## Contributing
237
238Contributions welcome. Send a pull request to this repository.
239
240See GUI/README.md for instructions on building the GUI.
241
242Ping the discord if you need help getting set up.
243
244## Roadmap
245
246### Milestone 1: STT Personally usable
247
248Status: COMPLETE.
249
250Scope: The speech-to-text may be used by one developer intimately familiar with
251its inner workings. Environment is not encapsulated.
252
253Completed at commit 8326dee0bf01956.
254
255### Milestone 2: STT Generally usable
256
257Status: COMPLETE.
258
259Scope: The speech-to-text is used by at least one user not familiar with its
260inner workings. Dependency management is mostly handled mechanically. The app
261can be controlled using a GUI.
262
263Completed at commit 1f15133dd985442, AKA release 0.10.0.
264
265### Milestone 3: STT Generally performant
266
267Status: COMPLETE.
268
269Scope: The speech-to-text may be used on resource constrained systems.
270
271I'm looking at Const-Me/Whisper as the transcription
272backend. I have measured terrible accuracy when using the VAD-segmented
273transcription path vs. using the file-based non-VAD-segmented transcription
274path (~15x higher edit distance on the same recording of the Bill of Rights).
275Beam search has not measurably improved the file-based transcription path.
276It remains to be seen if VAD segmentation is the failure source, or if
277it's caused by the inference layer being unable to "second guess" itself
278(previous transcriptions cannot be edited in the current architecture),
279or something else.
280
281Completed at commit 1f2e5c6cf16e7e7, AKA release 0.11.2.
282
283### Milestone 4: Enable non-VRChat use cases
284
285Status: COMPLETE.
286
287Scope: The speech-to-text may be used as a tool for usecases outside of VRChat.
288
289Streamers could use the STT as an OBS browser source. VR players could use it
290to type into arbitrary text fields (voice-driven keyboard device). MMO players
291could also use the voice-driven keyboard (speak -> preview -> rapid commit?)
292while raiding.
293
294Completed at commit 7a576bcac1c37c3, AKA release 0.13.1.
295
296### Milestone 5: Integration into other tools
297
298Status: NOT STARTED.
299
300Scope: Integrate performant client-side transcription into other STT tools.
301
302Once performant client-side transcription is implemented, there is no reason
303to keep it locked away inside one project. Other projects making different
304tradeoffs (such as relying on cloud services for TTS) could benefit from this
305functionality, driving down costs and latency for users. In particular, I think
306that there is value in integrating with TTS-Voice-Wizard.
307
308TaSTT is about providing performant, commoditized, user-owned STT services. I
309have no interest in using cloud services to provide any functionality.
310Instead of extending this project to do that, the best way to spread the love
311is to partner with (contribute to) projects that do.
312
313### Completion
314
315This project will probably reach a stable state and then go into maintenance.
316The efforts described above are the major milestones I plan to implement. Small
317features and bugfixes will likely continue in the "completed" state.
318
319## Backlog
320
3211. Better Unity integrations
322   1. Port all scripts to Unity-native C# scripts.
323   2. ~~Support appending to existing FX layers.~~ DONE
324   3. Use VRCSDK to generate FX layer instead of generating the serialized files.
3252. In-game usability features.
326   1. ~~Resizing (talk to friends far away).~~ DONE
327   2. ~~Basic toggles (hide it when not needed).~~ DONE
328   3. ~~World mounting (leave it in a fixed position in world space).~~ DONE
329   4. ~~Avatar mounting (attach it to your hand)~~ DONE.
330   5. ~~Controller triggers (avoid having to use the radial menu every time you
331     want to speak).~~ DONE
3323. General usability features.
333   1. ~~Error detection & correction.~~ DONE
334   2. ~~Text-to-text interface. Type in terminal, show in game.~~ DONE
335   3. ~~Speech-to-text interface. Speak out loud, show in game.~~ DONE
336   4. ~~Translation into non-English. Whisper natively supports translating N
337      languages into English, but not the other way around.~~ DONE
338   5. Display text in overlay. Enables (1) lower latency view of TaSTT's
339      transcription state; (2) checking transcriptions ahead of time; (3)
340      checking transcriptions without having to see the board in game.
341   6. TTS. Multiple people have requested this. See if there are open source
342      algorithms available; or, figure out how to integrate with
343   7. ~~Save UI input fields to config file. Persist across process exit. It's
344      annoying having to re-enter the config every time I use the STT.~~ DONE
345   8. ~~Customizable controller bindings. Someone mentioned they use left click
346      to unmute. Let's work around users, not make them change their existing
347      keybinds.~~ DONE
348   9. One-click upgrade. Fetch latest stable release, copy over virtual env and
349      UI configs, relaunch.
350   10. ~~Browser source for OBS. Blocker: the transcription layer doesn't handle
351      long pauses well.~~ DONE
352   11. Test suite. Some long representative transcripts with mechanical word
353       error rate (WER) calculation.
3544. Optimization
355   1. ~~Utilize the avatar 3.0 SDK's ability to drive parameters to reduce the
356     total # of parameters (and therefore OSC messages & sync events). Note
357     that the parameter memory usage may not decrease.~~ DONE
358   2. ~~Optimize FX layer. We have 14k animations and a 1.2 million line FX
359      layer. Something must be rethought to bring these numbers down.~~ DONE
360   3. ~~Implement multicore YAML parsing. This will make working with large
361      animators much more practical.~~ DONE
362   4. ~~Transcription engine sleep interval increases exponentially up to 1-2
363      seconds, then jumps back to a short interval once speech is detected.
364      This should significantly cut down on idle resource consumption. Perhaps
365      there's even a more efficient way to detect the odds that anything is
366      being said, which we could use to gate transcription.~~ DONE
367   5. There are ~64k words in the English language. We could encode each word
368      using a 16-bit int. On the other hand, suppose you represented each
369      character using 7 bits per character and transmitted words
370      character-by-character. The average word length is 4.7 characters, and we
371      send ~1 space character per word. Thus the expected bits per word in an
372      optimized version of today's encoding scheme is (5.7 * 7) == 39.9 bits.
373      The other encoding scheme is thus ~2.5 times more efficient. This could
374      be used to significantly speed up sync times. (Thanks, Noppers for the
375      idea!)
376   6. ~~Use Const-Me/Whisper for transcription.~~ WON'T DO
377   7. ~~Implement beam search in Const-Me/Whisper.~~ WON'T DO
3785. Bugfixes
379   1. ~~The whisper STT says "Thank you." when there's no audio?~~ DONE
380   2. JP and CN transcription does not work in the GUI due to encoding issues.
3816. Shine
382   1. Smooth scrolling.
383   2. ~~Infinite scrolling.~~ DONE
384   3. ~~Sound indicator, maybe like animal crossing :)~~ DONE
385   4. ~~Support texture-based PBR shading~~ DONE
386