Are you using someone else’s idea of a typescript library for interacting with realtime? It may have hard-coded allowed values of the past. The same fault as OpenAI’s library - immediately obsolete forever by trying to validate inputs.
You cannot change a voice once a session has been initiated. It is likely equivalent to an initial prompt injection to make the AI follow the response pattern.
You can easily circumvent this by coercing the type.
type asdf = "abc" | "def";
const a = "abcd" as asdf;
No fault here. It’s now very easy to know that asdf has been prepared to use a subset of strings, instead of crossing fingers. This is just a very simplified enum.