For an existing Azure Speech Java configuration, set the proxy before constructing the recognizer that consumes it:

speechConfig.setProxy("proxy.example", 8080, "", "");

The first argument is the proxy hostname without http://. The second is an integer port. For a permitted public-proxy test with non-sensitive audio, the HTTP proxy list supplies host and port candidates. The empty strings mean that no proxy username or password is required; supply the intended proxy account there when needed.

speechConfig is the application’s SpeechConfig instance. Continue creating the intended recognizer with that configuration and its normal audio setup. A service key or token still belongs to the Speech service configuration, independently of the intermediary account.

The Java API documents that this proxy functionality has no effect on macOS. Keep that platform restriction in the diagnosis rather than repeatedly changing the same host or credentials there.

Allakkat attuumassuteqartut