recordAudio
recordAudio
- recordAudio(
params?):Promise<CallRecording>
Records the audio from the call.
Parameters
params
Object containing the parameters for recording audio.
beep
Whether to play a beep before recording.
format
Format of the recording.
stereo
Whether to record in stereo mode.
direction
Direction to record. Can be listen (what the caller hears), speak (what the caller says), or both.
initialTimeout
How long to wait (in seconds) until something is heard in the recording. Disable by passing 0.
endSilenceTimeout
How long to wait (in seconds) until the caller has stopped speaking. Disable by passing 0.
terminators
DTMF digits that, when dialed, will end the recording.
inputSensitivity
Controls how sensitive the voice activity detector is to background noise, where 0 is least sensitive (hear nothing) and 100 is most sensitive (hear everything).
Returns
Promise<CallRecording>
A promise that resolves to a CallRecording object that you can use to
view the current state and results of the recording session.
Example
In this example, we dial a phone number and record the call audio. During the recording, we play a TTS message. Once the TTS message is finished, we hangup the call and print the URL of the recording to console.