• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/voximplant/transportcall.php
  • Класс: Bitrix\Sender\Integration\VoxImplant\TransportCall
  • Вызов: TransportCall::getDuration
public function getDuration(Message\Adapter $message = null)
{
	$messageText = $message->getConfiguration()->get('MESSAGE_TEXT');
	$voiceSpeed = $message->getConfiguration()->get('VOICE_SPEED');
	$length = SpeechRate::create()
		->withSpeed($voiceSpeed)
		->withText($messageText)
		->getDuration();

	$length = $length ?: 20;
	$magic = 5;
	$limit = $this->getCountLimiter()->getLimit();

	return round(($length + $magic) / $limit);
}