Send audio clip to this peer.
        :param audio: File path to audio to send.
        :param reply: Message object or message_id to reply to.
        :param on_success: Callback to call when call is complete.

        :type reply: int or Message
338803
def send_audio(self, audio: str, reply: Message=None, on_success: callable=None,
                   reply_markup: botapi.ReplyMarkup=None):
        

        self.twx.send_audio(peer=self, audio=audio, reply_to_message_id=reply, on_success=on_success,
                            reply_markup=reply_markup)
379539
def send(
            self,
            *,
            text: str,
    ) -> List[OutputRecord]:
        
        try:
            status = self.api.update_status(text)
            self.ldebug(f"Status object from tweet: {status}.")
            return [TweetRecord(record_data={"tweet_id": status._json["id"], "text": text})]

        except tweepy.TweepError as e:
            return [self.handle_error(
                message=(f"Bot {self.bot_name} encountered an error when "
                 f"sending post {text} without media:\n{e}\n"),
                error=e)]
901481
async def sendAnimation(self, chat_id, animation,
                            duration=None,
                            width=None,
                            height=None,
                            thumb=None,
                            caption=None,
                            parse_mode=None,
                            disable_notification=None,
                            reply_to_message_id=None,
                            reply_markup=None):
        
        p = _strip(locals(), more=['animation'])
        return await self._api_request_with_file('sendAnimation', _rectify(p), 'animation', animation)
389434
def send_photo(self, chat_id, photo, caption=None, reply_to_message_id=None, reply_markup=None):
        
        self.logger.info('send photo %s', photo)
        payload = dict(chat_id=chat_id,
                       caption=caption,
                       reply_to_message_id=reply_to_message_id,
                       reply_markup=reply_markup)
        files = dict(photo=open(photo, 'rb'))
        return Message.from_api(self, **self._post('sendPhoto', payload, files))
933780
function send(err, reply, cb) {

  // invoke before function, used to end a slowlog
  // timer before sending output
  if(this.before) this.before();

  if(this.cb) {
    return this.cb(err, reply);
  }
  this.conn.write(err || reply, cb);
}
672486
def sendVideo(self, chat_id, video,
                  duration=None,
                  width=None,
                  height=None,
                  thumb=None,
                  caption=None,
                  parse_mode=None,
                  supports_streaming=None,
                  disable_notification=None,
                  reply_to_message_id=None,
                  reply_markup=None):
        
        p = _strip(locals(), more=['video'])
        return self._api_request_with_file('sendVideo', _rectify(p), 'video', video)
279496
def reply(self, message: typing.Union[int, types.Message]):
        
        setattr(self, 'reply_to_message_id', message.message_id if isinstance(message, types.Message) else message)
        return self
292806
public function replyMusic($title, $discription, $musicurl, $hqmusicurl, $thumb_media_id){
        return $this->response(func_get_args(), self::MSG_TYPE_MUSIC);
    }
745423
def send_stop_audio(self):
        '''
        
        '''
        assert self._session_id != VoiceService.SESSION_ID_INVALID

        self._pebble.send_packet(AudioStream(session_id=self._session_id, data=StopTransfer()))
1333717
function onAudioInputCapture(evt) {
    try {
        if (evt && evt.data) {
            // Increase the debug counter for received data
            totalReceivedData += evt.data.length;

            // Push the data to the audio queue (array)
            audioDataQueue.push(evt.data);
        }
    }
    catch (ex) {
        alert("onAudioInputCapture ex: " + ex);
    }
}
685203
def reply(self,message,message_type):
        
        if message_type == MULTIPART:
            raise Exception("Unsupported reply type")
            
        super(Replier,self).send(message,message_type)
877316
def send_message(chat_id):
    

    files = request.files

    if files:
        res = send_media(chat_id, request)
    else:
        message = request.form.get('message')
        res = g.driver.chat_send_message(chat_id, message)

    if res:
        return jsonify(res)
    else:
        return False
887148
def play(self, filename, translate=False):  # pragma: no cover
        '''
        
        '''
        # FIXME: Use platform-independent and async audio-output here
        # PyAudio looks most promising, too bad about:
        #  --allow-external PyAudio --allow-unverified PyAudio
        if translate:
            with tempfile.NamedTemporaryFile(suffix='.wav', delete=False) as f:
                fname = f.name
            with audioread.audio_open(filename) as f:
                with contextlib.closing(wave.open(fname, 'w')) as of:
                    of.setnchannels(f.channels)
                    of.setframerate(f.samplerate)
                    of.setsampwidth(2)
                    for buf in f:
                        of.writeframes(buf)
            filename = fname

        if winsound:
            winsound.PlaySound(str(filename), winsound.SND_FILENAME)
        else:
            cmd = ['aplay', str(filename)]
            self._logger.debug('Executing %s', ' '.join([pipes.quote(arg) for arg in cmd]))
            subprocess.call(cmd)

        if translate:
            os.remove(fname)
598699
def send(phone_number, audio_url, wait_for_user_anwser=false, shown_number=nil)
      body = {
        numero_destino: phone_number,
        url_audio: audio_url,
        resposta_usuario: wait_for_user_anwser,
        shown_number: shown_number
      }

      puts self.class.post('/audio', {body: body.to_json})
    end
812261
def __reply(self, reply, args, kwargs):
        
        binding = self.method.binding.input
        msg = binding.get_message(self.method, args, kwargs)
        log.debug('inject (simulated) send message:\n%s', msg)
        binding = self.method.binding.output
        return self.succeeded(binding, reply)
1337484
@Override
    	protected void doSuccessResponse(SipServletResponse resp)
			throws ServletException, IOException {
		if (resp.getStatus() == SipServletResponse.SC_OK) {
			String audioFilePath = (String)getServletContext().getAttribute("audioFilePath");
			logger.info("audio file path is " + audioFilePath);
			try {
				MsPeer peer = MsPeerFactory.getPeer("org.mobicents.mscontrol.impl.MsPeerImpl");
				MsProvider provider = peer.getProvider();
				MsSession session = provider.createSession();
				MsConnection connection = session.createNetworkConnection(PR_JNDI_NAME);
				MediaConnectionListener listener = new MediaConnectionListener();
				listener.setResponse(resp);
				listener.setAudioFilePath(audioFilePath);
				connection.addConnectionListener(listener);
				Object sdpObj = resp.getContent();
				byte[] sdpBytes = (byte[]) sdpObj;
				String sdp = new String(sdpBytes); 
				connection.modify("$", sdp);
			} catch (ClassNotFoundException e) {
				logger.error("class not found ", e);
			}			
		}
	}
175733
def reply_webapi(self, text, attachments=None, as_user=True, in_thread=None):
        
        if in_thread is None:
            in_thread = 'thread_ts' in self.body

        if in_thread:
            self.send_webapi(text, attachments=attachments, as_user=as_user, thread_ts=self.thread_ts)
        else:
            text = self.gen_reply(text)
            self.send_webapi(text, attachments=attachments, as_user=as_user)