Replies: 10 comments
-
Are you sure that you receive 2 Bytes = 16 Bit? Normally you will get 8 Bit = 1 Byte. It worked for me, and the saved audio-file is totally okay. My Code:
|
Beta Was this translation helpful? Give feedback.
-
That's correct, PCMU/A is 8 bit |
Beta Was this translation helpful? Give feedback.
-
Thanks, sometimes the right solution is so easy. It works for me too. |
Beta Was this translation helpful? Give feedback.
-
This code works, recording is permanently. How can i stop recording by time or (will be better) by silent in channel?
|
Beta Was this translation helpful? Give feedback.
-
You could probably do something like: if data != b"\x80" * len(data):
w.writeframes(data) |
Beta Was this translation helpful? Give feedback.
-
I'm trying to record a few seconds of a certain part in a call. However, I can't even get a simple recording to work properly... I want to save a recording as a .wav file. What am I missing here?
|
Beta Was this translation helpful? Give feedback.
-
Don't use print() in the function answer(). If you need logging then use recording into a file. Parameter "blocking" better left by default. |
Beta Was this translation helpful? Give feedback.
-
@TipsTricksMore, definitely heed what @Koshkodav said about blocking. But I think your problem is you don't want to be using |
Beta Was this translation helpful? Give feedback.
-
I am getting only a 0-sec file what am I doing wrong? |
Beta Was this translation helpful? Give feedback.
-
I believe the issue you are having is the |
Beta Was this translation helpful? Give feedback.
-
I try to record the call. For this I use this part in the callback function answer
This writes a wav file, but I only get is very noisy. I think the parameters in setparams a not right. But I don't know what to set here.
Beta Was this translation helpful? Give feedback.
All reactions