Tags: speechmatics/speechmatics-python-sdk
Tags
Add optional timestamp parameter to ForceEndOfUtterance message
## What's Changed?
Add an extra **optional** attribute** to the `ForceEndOfUtterance` message to help the engine know the real-world time marker for when the forced end of utterance should be considered. It should **only** be used with transcribers that support this extended message.
```
{"message": "ForceEndOfUtterance", "timestamp": 1.23}
```
Using the `client.audio_seconds_sent` property will return the number of seconds of audio that have been sent to the transcriber, calculated using encoding format and sample rate of the session's audio (`AudioFormat`). This can then be used when calling the force end of utterance:
```
client.force_end_of_utterance(timestamp=client.audio_seconds_sent)
```
For transcribers that don't support the new timestamp parameter in this message (**version < 15.2.0**), we could disable it by passing in the function `timestamp=None` as such:
```
client.force_end_of_utterance(timestamp=None)
```
Add user_id as input to header too for http batch V2 API Add user_id as input to header too for http batch V2 API
PreviousNext