Davidliu há 3 meses atrás
pai
commit
71ace3aa63
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      src/core/voip/constant.py

+ 4 - 2
src/core/voip/constant.py

@@ -19,10 +19,12 @@ def build_audio_format():
     fmt = pj.MediaFormatAudio()
     fmt.type = pj.PJMEDIA_TYPE_AUDIO
     fmt.id = pj.PJMEDIA_FORMAT_PCM
-    fmt.clockRate = 16000  # 采样率
     fmt.channelCount = 1  # 通道数
-    fmt.frameTimeUsec = 20000  # 每帧的时间(20 毫秒)
     fmt.bitsPerSample = 16  # 每个采样的位数
+    fmt.clockRate = 8000  # 采样率
+    fmt.frameTimeUsec = 12500  # 每帧的时间(20 毫秒)
+    # fmt.clockRate = 16000  # 采样率
+    # fmt.frameTimeUsec = 20000  # 每帧的时间(20 毫秒)
     return fmt