Respond with detected language for TTS API

https://platform.openai.com/docs/api-reference/audio/createSpeech has a language detection element which can have a varying degree of success (that’s not my concern atm, it seems to be doing a decent job). However, it’d be super helpful to receive the detected locale as a response header which can be used for internal tracking. As a consumer of the API I can’t do my own detection based on speech nor rely on request based detection as it’ll be inconsistent.

So something like locale-processed: en_US or something would be a nice addition to the API

2 Likes