Record sound and return waveform.
Can specify duration (by default in seconds). If duration is None (the default), the record function will run until it is interrupted. There should be an argument that specifies what exceptions to ignore, and simply exit the with block (all others will be raised). By default this argument contains (KeyboardInterrupt,).
Can specify duration unit (Literal['seconds', 'samples', 'minutes']).
Can specify an egress function -- what is returned is egress(wf). If None, lambda wf: wf will be taken. If a string, will save the waveform to a file.
Record sound and return waveform.
Can specify duration (by default in seconds). If duration is None (the default), the record function will run until it is interrupted. There should be an argument that specifies what exceptions to ignore, and simply exit the with block (all others will be raised). By default this argument contains
(KeyboardInterrupt,).Can specify duration unit (Literal['seconds', 'samples', 'minutes']).
Can specify an
egressfunction -- what is returned is egress(wf). If None,lambda wf: wfwill be taken. If a string, will save the waveform to a file.