- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 23.5k
 
Open
Description
Tested versions
- 4.5.stable
 
System information
Windows 11
Issue description
Compare these two outputs:
var locale: String = TranslationServer.get_locale()
var voices: PackedStringArray = DisplayServer.tts_get_voices_for_language(locale)
if voices.is_empty():
    return
var id: int = (2**31) - 1
print(id)
DisplayServer.tts_speak("Test", voices[0], 50, 1.0, 1.0, id, true)
DisplayServer.tts_set_utterance_callback(DisplayServer.TTS_UTTERANCE_ENDED, _CB_TTS_Utterance_Ended)
func _CB_TTS_Utterance_Ended(p_utterance_id: int) -> void:
	print("CALLBACK: ", p_utterance_id)CALL: 2147483647
CALLBACK: 2147483647
var locale: String = TranslationServer.get_locale()
var voices: PackedStringArray = DisplayServer.tts_get_voices_for_language(locale)
if voices.is_empty():
    return
var id: int = (2**31)
print(id)
DisplayServer.tts_speak("Test", voices[0], 50, 1.0, 1.0, id, true)
DisplayServer.tts_set_utterance_callback(DisplayServer.TTS_UTTERANCE_ENDED, _CB_TTS_Utterance_Ended)
func _CB_TTS_Utterance_Ended(p_utterance_id: int) -> void:
	print("CALLBACK: ", p_utterance_id)CALL: 2147483648
CALLBACK: -2147483648
This makes it impossible to use Object.get_instance_id() as the utterance_id.
Steps to reproduce
- Create an empty project with a node and a script attached to it.
 - Add the code examples provided above inside the 
_readyfunction.