MCPcopy
hub / github.com/adamcohenhillel/ADeus / is_silent

Function is_silent

scripts/python_recorder_client/main.py:52–59  ·  view source on GitHub ↗
(data_chunk)

Source from the content-addressed store, hash-verified

50
51
52def is_silent(data_chunk):
53 as_ints = np.frombuffer(data_chunk, dtype=np.int16)
54 mean = np.mean(as_ints ** 2)
55 if np.isnan(mean):
56 return None
57
58 volume = np.sqrt(mean)
59 return volume < args.sensitivity
60
61
62def get_wav_filename():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected