recordAudio
recordAudio
- recordAudio(
params?):Promise<CallRecording>
Records the audio from the call.
Parameters
Object containing the parameters for recording audio.
Whether to play a beep before recording.
Format of the recording.
Whether to record in stereo mode.
Direction to record. Can be listen (what the caller hears), speak (what the caller says), or both.
How long to wait (in seconds) until something is heard in the recording. Disable by passing 0.
How long to wait (in seconds) until the caller has stopped speaking. Disable by passing 0.
DTMF digits that, when dialed, will end the recording.
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.