Skip to content

Commit dd4f5d0

Browse files
authored
Update audio-streaming-quickstart-csharp.md
acrolinx fixes
1 parent 92c9edc commit dd4f5d0

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/communication-services/how-tos/call-automation/includes/audio-streaming-quickstart-csharp.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ ms.author: alvinhan
2121
## Set up a websocket server
2222
Azure Communication Services requires your server application to set up a WebSocket server to stream audio in real-time. WebSocket is a standardized protocol that provides a full-duplex communication channel over a single TCP connection.
2323

24-
You can review documentation [here](https://azure.microsoft.com/blog/introduction-to-websockets-on-windows-azure-web-sites/) to learn more about websockets and how to use them.
24+
You can review documentation [here](https://azure.microsoft.com/blog/introduction-to-websockets-on-windows-azure-web-sites/) to learn more about WebSockets and how to use them.
2525

2626
## Receiving and Sending audio streaming data
27-
There are multiple ways to start receiving audio stream, which can be configured using the `startMediaStreaming` flag in the `mediaStreamingOptions` setup. You can also specify the desired sample rate used for recieving or sending audio data using the `audioFormat` parameter. Currently supported formats are PCM 24K mono and PCM 16K mono, with the default being PCM 16K mono.
27+
There are multiple ways to start receiving audio stream, which can be configured using the `startMediaStreaming` flag in the `mediaStreamingOptions` setup. You can also specify the desired sample rate used for receiving or sending audio data using the `audioFormat` parameter. Currently supported formats are PCM 24K mono and PCM 16K mono, with the default being PCM 16K mono.
2828

29-
To enable bidirectional audio streaming, where you're sending audio data into the call, you can enable the `EnableBidirectional` flag. For more details refer to the [API specifications](https://learn.microsoft.com/rest/api/communication/callautomation/answer-call/answer-call?view=rest-communication-callautomation-2024-06-15-preview&tabs=HTTP#mediastreamingoptions).
29+
To enable bidirectional audio streaming, where you're sending audio data into the call, you can enable the `EnableBidirectional` flag. For more details, refer to the [API specifications](https://learn.microsoft.com/rest/api/communication/callautomation/answer-call/answer-call?view=rest-communication-callautomation-2024-06-15-preview&tabs=HTTP#mediastreamingoptions).
3030

3131
### Start streaming audio to your webserver at time of answering the call
3232
Enable automatic audio streaming when the call is established by setting the flag `startMediaStreaming: true`.
3333

34-
This ensures that audio streaming starts automatically as soon as the call is connected.
34+
This setting ensures that audio streaming starts automatically as soon as the call is connected.
3535

3636
``` C#
3737
var mediaStreamingOptions = new MediaStreamingOptions(
@@ -80,9 +80,9 @@ await callMedia.StartMediaStreamingAsync();
8080

8181

8282
## Stop audio streaming
83-
To stop recieving audio streams during a call, you can use the **Stop streaming API**. This allows you to stop the audio streaming at any point in the call. There are two ways that audio streaming can be stopped;
83+
To stop receiving audio streams during a call, you can use the **Stop streaming API**. This allows you to stop the audio streaming at any point in the call. There are two ways that audio streaming can be stopped;
8484
1. **Triggering the Stop streaming API:** Use the API to stop receiving audio streaming data while the call is still active.
85-
2. **Automatic stop on call disconnect:** Audio streaming will automatically stop when the call is disconnected.
85+
2. **Automatic stop on call disconnect:** Audio streaming automatically stops when the call is disconnected.
8686

8787
``` C#
8888
StopMediaStreamingOptions options = new StopMediaStreamingOptions() {
@@ -93,7 +93,7 @@ await callMedia.StopMediaStreamingAsync();
9393
```
9494

9595
## Handling audio streams in your websocket server
96-
The sample below demonstrates how to listen to audio streams using your websocket server.
96+
This sample demonstrates how to listen to audio streams using your websocket server.
9797

9898
``` C#
9999
private async Task StartReceivingFromAcsMediaWebSocket(Websocket websocket) {
@@ -114,7 +114,7 @@ private async Task StartReceivingFromAcsMediaWebSocket(Websocket websocket) {
114114
}
115115
```
116116

117-
The first packet you receive will contain metadata about the streaming, including audio settings such as encoding, sample rate, and other configuration details.
117+
The first packet you receive contains metadata about the stream, including audio settings such as encoding, sample rate, and other configuration details.
118118

119119
``` json
120120
{
@@ -144,11 +144,11 @@ After sending the metadata packet, Azure Communication Services (ACS) will begin
144144
```
145145

146146
## Sending audio streaming data to Azure Communication Services
147-
If bidirectional streaming is enabled using the `EnableBidirectional` flag in the `MediaStreamingOptions`, you can stream audio data back to Azure Communication Services, which will play the audio into the call.
147+
If bidirectional streaming is enabled using the `EnableBidirectional` flag in the `MediaStreamingOptions`, you can stream audio data back to Azure Communication Services, which plays the audio into the call.
148148

149-
Once Azure Communication Services begins streaming audio to your WebSocket server, you can relay the audio to the LLM and vice versa. After the LLM processes the audio content, it streams the response back to your service, which you can then send into the Azure Communication Services call.
149+
Once Azure Communication Services begins streaming audio to your WebSocket server, you can relay the audio to your AI services. After your AI service processes the audio content, you can stream the audio back to the on-going call in Azure Communication Services.
150150

151-
The example below demonstrates how to transmit the audio data back into the call after it has been processed by another service, for instance Azure OpenAI or other such voice based Large Language Models.
151+
The example demonstrates how another service, such as Azure OpenAI or other voice-based Large Language Models, processes and transmits the audio data back into the call.
152152

153153
``` C#
154154
var audioData = OutStreamingData.GetAudioDataForOutbound(audioData)),

0 commit comments

Comments
 (0)