telegram.voice module

This module contains an object that represents a Telegram Voice.

class telegram.voice.Voice(file_id, duration, mime_type=None, file_size=None, **kwargs)

Bases: telegram.base.TelegramObject

This object represents a Telegram Voice.

file_id

str

duration

int

mime_type

str

file_size

int

Parameters:
  • file_id (str) –
  • duration (Optional[int]) –
  • **kwargs – Arbitrary keyword arguments.
Keyword Arguments:
 
  • mime_type (Optional[str]) –
  • file_size (Optional[int]) –
static de_json(data, bot)
Parameters:
Returns:

Return type:

telegram.Voice