Strings (written with ") and charlists (written with ') are different things. There’s a good introduction in the docs.
String.replace is still going to return a string - the quotes are not part of the value, they are how the value is written literally.
System.get_env expects a string, not a charlist, so it gives you an error if you write System.get_env('VOSK_MODEL')
You need to convert the string value returned from System.get_env into a charlist for the :vosk library - the String.to_charlist/1 function is a good choice for this.