You can achieve the above requirement using both API and XML.
XML
You can pass the below parameter while initiating MPC via XML to record the audio of that specific participant.
Attributes
Argument | Datatype | Description |
recordParticipantTrack | Boolean |
Indicates whether single-track or participant-level recording will be initiated when the participant joins the MPC bridge. Default: false |
API
Using APIs, You can achieve this during the addition of new participant to the MPC or by invoking participant-level recording.
Add a participant to a multiparty call using API
You can initiate the single-track or participant-level recording while adding the participant to the MPC bridge
Parameter | Datatype | Description |
record_participant_track (optional) |
Boolean |
Indicates whether single-track or participant-level recording will be initiated when the participant joins the MPC bridge. The generated recording file will contain only the audio of the specified participant. Default: false |
Start participant-level recording
Alternatively, you can initiate the participant or single track recording using the participant level recording API.
Parameter | Datatype | Description |
record_track_type (optional) |
string |
Indicates if the recording track is at the participant level or includes all channels. Possible values: participant / all / both participant: Initiates single-track or participant-level recording for the provided member_id. all: Initiates multi-channel recording for the specified participant. both: Initiates both single-track/participant-level and all-channel recordings. Default: all |