Skip to content

Commit 2a1fd9b

Browse files
committed
Edits
Ran Acrolinx and edited.
1 parent a65989a commit 2a1fd9b

File tree

2 files changed

+56
-40
lines changed

2 files changed

+56
-40
lines changed

articles/communication-services/quickstarts/voice-video-calling/includes/call-recording-samples/call-recording-csharp.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ Call Recording APIs use exclusively the `serverCallId`to initiate recording. The
2323
### Call Automation scenarios
2424

2525
When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you have two options to get the `serverCallId`:
26-
1) Once a call is created, it returns a `serverCallId` as a property of the `CallConnected` event after a call is established. Learn how to [Get CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-csharp#update-programcs) from Call Automation SDK.
27-
2) Once you answer the call or a call is created, it returns the `serverCallId` as a property of the `AnswerCallResult` or `CreateCallResult` API responses respectively.
26+
27+
1. When you establish a call, it returns a `serverCallId` as a property of the `CallConnected` event after a call is established. Learn how to [Get CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-csharp#update-programcs) from Call Automation SDK.
28+
29+
2. When you answer the call or a call is created, it returns the `serverCallId` as a property of the `AnswerCallResult` or `CreateCallResult` API responses respectively.
2830

2931
### Calling SDK scenarios
3032

@@ -46,9 +48,9 @@ CallAutomationClient callAutomationClient = new CallAutomationClient("<ACSConnec
4648
## 2. Start recording session with StartRecordingOptions using 'StartAsync' API
4749

4850
Use the `serverCallId` received during initiation of the call.
49-
- RecordingContent is used to pass the recording content type. Use audio
50-
- RecordingChannel is used to pass the recording channel type. Use mixed or unmixed.
51-
- RecordingFormat is used to pass the format of the recording. Use wav.
51+
- Use `RecordingContent` to pass the recording content type. Use `audio`.
52+
- Use `RecordingChannel` to pass the recording channel type. Use `mixed` or `unmixed`.
53+
- Use `RecordingFormat` to pass the format of the recording. Use `wav`.
5254

5355
```csharp
5456
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<ServerCallId>"))
@@ -62,7 +64,8 @@ Response<RecordingStateResult> response = await callAutomationClient.GetCallReco
6264
.StartAsync(recordingOptions);
6365
```
6466
### 2.1. Start Recording - Bring Your Own Azure Blob Store
65-
Start Recording with your own Azure Blob Storage defined to store the recording file once recording is complete.
67+
68+
To store the recording file when recording is complete, start recording with your own Azure Blob Storage defined.
6669

6770
```csharp
6871
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<ServerCallId>"))
@@ -123,35 +126,36 @@ StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCal
123126
};
124127
Response<RecordingStateResult> response = await callAutomationClient.GetCallRecording().StartAsync(recordingOptions);
125128
```
129+
126130
The `StartAsync` API response contains the `recordingId` of the recording session.
127131

128-
## 3. Stop recording session using 'StopAsync' API
132+
## 3. Stop recording session using `StopAsync` API
129133

130134
Use the `recordingId` received in response of `StartAsync`.
131135

132136
```csharp
133137
var stopRecording = await callAutomationClient.GetCallRecording().StopAsync(recordingId);
134138
```
135139

136-
## 4. Pause recording session using 'PauseAsync' API
140+
## 4. Pause recording session using `PauseAsync` API
137141

138142
Use the `recordingId` received in response of `StartAsync`.
139143

140144
```csharp
141145
var pauseRecording = await callAutomationClient.GetCallRecording ().PauseAsync(recordingId);
142146
```
143147

144-
## 5. Resume recording session using 'ResumeAsync' API
148+
## 5. Resume recording session using `ResumeAsync` API
145149

146150
Use the `recordingId` received in response of `StartAsync`.
147151

148152
```csharp
149153
var resumeRecording = await callAutomationClient.GetCallRecording().ResumeAsync(recordingId);
150154
```
151155

152-
## 6. Download recording File using 'DownloadToAsync' API
156+
## 6. Download recording File using `DownloadToAsync` API
153157

154-
Use an [Azure Event Grid](../../../../../event-grid/event-schema-communication-services.md) web hook or other triggered action should be used to notify your services when the recorded media is ready for download.
158+
Use an [Azure Event Grid](../../../../../event-grid/event-schema-communication-services.md) web hook or other triggered action to notify your services when the recorded media is ready for download.
155159

156160
An Event Grid notification `Microsoft.Communication.RecordingFileStatusUpdated` is published when a recording is ready for retrieval, typically a few minutes after the recording finishes processing (such as when meeting ends or a recording stops). Recording event notifications include `contentLocation` and `metadataLocation`, which you can use to retrieve both recorded media and a recording metadata file.
157161

@@ -186,17 +190,18 @@ Example of the event schema:
186190
}
187191
```
188192

189-
Use `DownloadToAsync` API for downloading the recorded media.
193+
Use `DownloadToAsync` API to download the recorded media.
190194

191195
```csharp
192196
var recordingDownloadUri = new Uri(contentLocation);
193197
var response = await callAutomationClient.GetCallRecording().DownloadToAsync(recordingDownloadUri, fileName);
194198
```
195-
The `downloadLocation` for the recording can be fetched from the `contentLocation` attribute of the `recordingChunk`. `DownloadToAsync` method downloads the content into provided filename.
196199

197-
## 7. Delete recording content using 'DeleteAsync' API
200+
Fetch the `downloadLocation` for the recording from the `contentLocation` attribute of the `recordingChunk`. `DownloadToAsync` method downloads the content into provided filename.
201+
202+
## 7. Delete recording content using `DeleteAsync` API
198203

199-
Use `DeleteAsync` API for deleting the recording content (for example, recorded media, metadata)
204+
Use `DeleteAsync` API to delete the recording content (such as recorded media and metadata)
200205

201206
```csharp
202207
var recordingDeleteUri = new Uri(deleteLocation);

articles/communication-services/quickstarts/voice-video-calling/includes/call-recording-samples/call-recording-java.md

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ Call Recording APIs exclusively use the `serverCallId` to initiate recording. Th
2424
### Call Automation scenarios
2525

2626
When using [Call Automation](../../../call-automation/callflows-for-customer-interactions.md), you have two options to get the `serverCallId`:
27-
1) Once a call is created, a `serverCallId` is returned as a property of the `CallConnected` event after a call has been established. Learn how to [Get CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-java#update-programcs) from Call Automation SDK.
28-
2) Once you answer the call or a call is created the `serverCallId` is returned as a property of the `AnswerCallResult` or `CreateCallResult` API responses respectively.
27+
28+
1. Once a call is created, a `serverCallId` is returned as a property of the `CallConnected` event after a call is established. Learn how to [Get CallConnected event](../../../call-automation/callflows-for-customer-interactions.md?pivots=programming-language-java#update-programcs) from Call Automation SDK.
29+
30+
2. Once you answer the call or a call is created the `serverCallId` is returned as a property of the `AnswerCallResult` or `CreateCallResult` API responses respectively.
2931

3032
### Calling SDK scenarios
3133

@@ -37,21 +39,22 @@ Let's get started with a few simple steps.
3739

3840
## 1. Create a Call Automation client
3941

40-
Call Recording APIs are part of the Azure Communication Services [Call Automation](../../../../concepts/call-automation/call-automation.md) libraries. Thus, it's necessary to create a Call Automation client.
41-
To create a call automation client, you'll use your Communication Services connection string and pass it to `CallAutomationClient` object.
42+
Call Recording APIs are part of the Azure Communication Services [Call Automation](../../../../concepts/call-automation/call-automation.md) libraries. So you need to create a Call Automation client.
43+
44+
To create a call automation client, use your Communication Services connection string and pass it to `CallAutomationClient` object.
4245

4346
```java
4447
CallAutomationClient callAutomationClient = new CallAutomationClientBuilder()
4548
.connectionString("<acsConnectionString>")
4649
.buildClient();
4750
```
4851

49-
## 2. Start recording session with StartRecordingOptions using 'startWithResponse' API
52+
## 2. Start recording session with StartRecordingOptions using `startWithResponse` API
5053

5154
Use the `serverCallId` received during initiation of the call.
52-
- RecordingContent is used to pass the recording content type. Use AUDIO
53-
- RecordingChannel is used to pass the recording channel type. Use MIXED or UNMIXED.
54-
- RecordingFormat is used to pass the format of the recording. Use WAV.
55+
- Use `RecordingContent` to pass the recording content type. Use `AUDIO`.
56+
- Use `RecordingChannel` to pass the recording channel type. Use `MIXED` or `UNMIXED`.
57+
- Use `RecordingFormat` to pass the format of the recording. Use `WAV`.
5558

5659
```java
5760
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
@@ -66,7 +69,8 @@ Response<RecordingStateResult> response = callAutomationClient.getCallRecording(
6669
```
6770

6871
### 2.1. Start Recording - Bring Your Own Azure Blob Store
69-
Start Recording session with your own Azure Blob Storage to store the recording file once recording is complete.
72+
73+
To store the recording file when recording is complete, start the recording session with your own Azure Blob Storage.
7074

7175
```java
7276
StartRecordingOptions recordingOptions = new StartRecordingOptions(callLocator)
@@ -80,9 +84,11 @@ Start Recording session with your own Azure Blob Storage to store the recording
8084
RecordingStateResult result = callRecording.start(recordingOptions);
8185
```
8286

83-
### 2.2. Start recording session with Pause mode enabled using 'StartAsync' API
87+
### 2.2. Start recording session with Pause mode enabled using `StartAsync` API
88+
8489
> [!NOTE]
85-
> **Recordings will need to be resumed for recording file to be generated.**
90+
> **Recordings must be resumed for recording file to be generated.**
91+
8692
```java
8793
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
8894
.setRecordingChannel(RecordingChannel.UNMIXED)
@@ -98,7 +104,8 @@ Response<RecordingStateResult> response = callAutomationClient.getCallRecording(
98104
```
99105

100106
### 2.3. Only for Unmixed - Specify a user on channel 0
101-
To produce unmixed audio recording files, you can use the `AudioChannelParticipantOrdering` functionality to specify which user you want to record on channel 0. The rest of the participants will be assigned to a channel as they speak. If you use `RecordingChannel.Unmixed` but don't use `AudioChannelParticipantOrdering`, Call Recording will assign channel 0 to the first participant speaking.
107+
108+
To produce unmixed audio recording files, you can use the `AudioChannelParticipantOrdering` functionality to specify which user you want to record on channel 0. The rest of the participants are assigned to a channel as they speak. If you use `RecordingChannel.Unmixed` but don't use `AudioChannelParticipantOrdering`, Call Recording assigns channel 0 to the first participant speaking.
102109

103110
```java
104111
StartRecordingOptions recordingOptions = new StartRecordingOptions(new ServerCallLocator("<serverCallId>"))
@@ -114,6 +121,7 @@ Response<RecordingStateResult> response = callAutomationClient.getCallRecording(
114121
```
115122

116123
### 2.4. Only for Unmixed - Specify channel affinity
124+
117125
```java
118126
ChannelAffinity channelAffinity = new ChannelAffinity()
119127
.setParticipant(new PhoneNumberIdentifier("RECORDING_ID"))
@@ -131,39 +139,40 @@ Response<RecordingStateResult> response = callAutomationClient.getCallRecording(
131139
```
132140
The `startWithResponse` API response contains the `recordingId` of the recording session.
133141

134-
## 3. Stop recording session using 'stopWithResponse' API
142+
## 3. Stop recording session using `stopWithResponse` API
135143

136-
Use the `recordingId` received in response of `startWithResponse`.
144+
Use the `recordingId` received in response to `startWithResponse`.
137145

138146
```java
139147
Response<Void> response = callAutomationClient.getCallRecording()
140148
.stopWithResponse(response.getValue().getRecordingId(), null);
141149
```
142150

143-
## 4. Pause recording session using 'pauseWithResponse' API
151+
## 4. Pause recording session using `pauseWithResponse` API
152+
153+
Use the `recordingId` received in response to `startWithResponse`.
144154

145-
Use the `recordingId` received in response of `startWithResponse`.
146155
```java
147156
Response<Void> response = callAutomationClient.getCallRecording()
148157
.pauseWithResponse(response.getValue().getRecordingId(), null);
149158
```
150159

151-
## 5. Resume recording session using 'resumeWithResponse' API
160+
## 5. Resume recording session using `resumeWithResponse` API
152161

153-
Use the `recordingId` received in response of `startWithResponse`.
162+
Use the `recordingId` received in response to `startWithResponse`.
154163

155164
```java
156165
Response<Void> response = callAutomationClient.getCallRecording()
157166
.resumeWithResponse(response.getValue().getRecordingId(), null);
158167
```
159168

160-
## 6. Download recording File using 'downloadToWithResponse' API
169+
## 6. Download recording File using `downloadToWithResponse` API
161170

162171
Use an [Azure Event Grid](../../../../../event-grid/event-schema-communication-services.md) web hook or other triggered action should be used to notify your services when the recorded media is ready for download.
163172

164-
An Event Grid notification `Microsoft.Communication.RecordingFileStatusUpdated` is published when a recording is ready for retrieval, typically a few minutes after the recording process has completed (for example, meeting ended, recording stopped). Recording event notifications include `contentLocation` and `metadataLocation`, which are used to retrieve both recorded media and a recording metadata file.
173+
An Event Grid notification `Microsoft.Communication.RecordingFileStatusUpdated` is published when a recording is ready for retrieval, typically a few minutes after the recording process completes (such as meeting ends or recording stops). Recording event notifications include `contentLocation` and `metadataLocation`, which you can use to retrieve both recorded media and a recording metadata file.
165174

166-
Below is an example of the event schema.
175+
The following code is an example of the event schema.
167176

168177
```
169178
{
@@ -197,7 +206,7 @@ Below is an example of the event schema.
197206
Use `downloadToWithResponse` method of `CallRecording` class for downloading the recorded media. Following are the supported parameters for `downloadToWithResponse` method:
198207
- `contentLocation`: Azure Communication Services URL where the content is located.
199208
- `destinationPath` : File location.
200-
- `parallelDownloadOptions`: An optional ParallelDownloadOptions object to modify how the - parallel download will work.
209+
- `parallelDownloadOptions`: An optional `ParallelDownloadOptions` object to modify how the parallel download works.
201210
- `overwrite`: True to overwrite the file if it exists.
202211
- `context`: A Context representing the request context.
203212

@@ -212,15 +221,17 @@ Path destinationPath = Paths.get(filePath);
212221

213222
Response<Void> downloadResponse = callAutomationClient.getCallRecording().downloadToWithResponse(contentLocation, destinationPath, parallelDownloadOptions, overwrite, context);
214223
```
224+
215225
The content location and document IDs for the recording files can be fetched from the `contentLocation` and `documentId` fields respectively, for each `recordingChunk`.
216226

217-
## 7. Delete recording content using deleteWithResponse API.
227+
## 7. Delete recording content using `deleteWithResponse` API
218228

219-
Use `deleteWithResponse` method of `CallRecording` class for deleting the recorded media. Following are the supported parameters for `deleteWithResponse` method:
229+
Use `deleteWithResponse` method of `CallRecording` class to delete the recorded media. Supported parameters for `deleteWithResponse` method:
220230
- `deleteLocation`: Azure Communication Services URL where the content to delete is located.
221231
- `context`: A Context representing the request context.
222232

223233
```
224234
Response<Void> deleteResponse = callAutomationClient.getCallRecording().deleteWithResponse(deleteLocation, context);
225235
```
226-
The delete location for the recording can be fetched from the `deleteLocation` field of the Event Grid event.
236+
237+
The delete location for the recording can be fetched from the `deleteLocation` field of the Event Grid event.

0 commit comments

Comments
 (0)