从vb.net到电话的语音消息 [英] voice message from vb.net to telephone

查看:33
本文介绍了从vb.net到电话的语音消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试打个电话,并向手机发送语音消息

Hi, I try to make a phone call and send a voice message to a phone

但是,我需要帮助完成

我打电话,但是我无法发送语音消息.

I call but I can't send the voice message.

将strm设置为新FileStream("C:\ Visual Studio \ Projects \ prueba.wav",_ System.IO.FileMode.Open)

Dim strm As New FileStream("C:\Visual Studio\Projects\prueba.wav", _ System.IO.FileMode.Open)

      试试
           SerialPort1.Close()
          使用SerialPort1
                             .PortName ="COM7"
                             .BaudRate = 9600
                             .Parity = Parity.None
                             .StopBits = StopBits.One
                             .DataBits = 8
                             .Handshake =无握手
                             .ReceivedBytesThreshold = 15
                             .ReadTimeout = 20000
                             .WriteBufferSize = 8000

        Try
            SerialPort1.Close()
            With SerialPort1
                .PortName = "COM7"
                .BaudRate = 9600
                .Parity = Parity.None
                .StopBits = StopBits.One
                .DataBits = 8
                .Handshake = Handshake.None
                .ReceivedBytesThreshold = 15
                .ReadTimeout = 20000
                .WriteBufferSize = 8000

                .WriteTimeout = 1000

                .WriteTimeout = 1000

               .DtrEnable = True

                .DtrEnable = True

                   .RtsEnable = True

                 .RtsEnable = True

                   .NewLine = vbCrLf
          结尾为
           SerialPort1.Open()

                 .NewLine = vbCrLf
            End With
            SerialPort1.Open()

推荐答案

              My.Computer.Audio.Play(strm,AudioPlayMode.BackgroundLoop)
                    My.Computer.Audio.Stop()

                    My.Computer.Audio.Play(strm, AudioPlayMode.BackgroundLoop)
                    My.Computer.Audio.Stop()

您不播放音频文件-您将文件中的二进制数据发送到调制解调器.调制解调器然后播放"该文件.您需要确认音频文件的格式与调制解调器兼容(无论132,8000是 是).您可以使用流读取器将文件作为字节流打开,然后将字节流传输到串行端口.除非您知道音频文件足够小以适合调制解调器的音频文件,否则流媒体传输将由CTS线路的状态控制. 缓冲.您需要以比9600bd更高的数据速率打开端口,以避免消息中的停顿.

You don't play the audio file - you send the binary data from the file to the modem.  The modem then 'plays' the file.  You need to confirm that your audio file is in a data format that is compatible with the modem (whatever 132,8000 is).  You would open the file as a byte stream using a stream reader and stream the bytes to the serial port.  The streaming will be controlled by the state of the CTS line, unless you know that the audio file is small enough to fit in the modem's buffer. You will need to open the port at a much higher data rate than 9600bd to avoid pauses in the message.


这篇关于从vb.net到电话的语音消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆