2017-03-11 19:54:51 +01:00
|
|
|
---
|
|
|
|
title: inputMessageVoice
|
|
|
|
description: Voice message
|
|
|
|
---
|
|
|
|
## Constructor: inputMessageVoice
|
|
|
|
[Back to constructors index](index.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Voice message
|
|
|
|
|
|
|
|
### Attributes:
|
|
|
|
|
|
|
|
| Name | Type | Required | Description |
|
2017-08-20 11:05:56 +02:00
|
|
|
|----------|---------------|----------|-------------|
|
2017-03-11 19:54:51 +01:00
|
|
|
|voice|[InputFile](../types/InputFile.md) | Yes|Voice file to send|
|
|
|
|
|duration|[int](../types/int.md) | Yes|Duration of voice in seconds|
|
|
|
|
|waveform|[bytes](../types/bytes.md) | Yes|Waveform representation of the voice in 5-bit format|
|
|
|
|
|caption|[string](../types/string.md) | Yes|Voice caption, 0-200 characters|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Type: [InputMessageContent](../types/InputMessageContent.md)
|
|
|
|
|
|
|
|
|
|
|
|
### Example:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
$inputMessageVoice = ['_' => 'inputMessageVoice', 'voice' => InputFile, 'duration' => int, 'waveform' => 'bytes', 'caption' => 'string'];
|
2017-03-11 19:54:51 +01:00
|
|
|
```
|
|
|
|
|
2017-07-23 16:11:02 +02:00
|
|
|
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
{"_": "inputMessageVoice", "voice": InputFile, "duration": int, "waveform": "bytes", "caption": "string"}
|
2017-07-23 16:11:02 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2017-03-11 19:54:51 +01:00
|
|
|
Or, if you're into Lua:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2017-07-23 16:33:46 +02:00
|
|
|
inputMessageVoice={_='inputMessageVoice', voice=InputFile, duration=int, waveform='bytes', caption='string'}
|
2017-03-11 19:54:51 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|