You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/concepts/voice-video-calling/media-streaming.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Audio streams can be used in many ways, below are some examples of how developer
40
40
## Supported formats
41
41
42
42
### Mixed format
43
-
Contains mixed audio of all participants on the call.
43
+
Contains mixed audio of all participants on the call. As this is mixed audio, the participantRawID will be null.
44
44
45
45
### Unmixed
46
46
Contains audio per participant per channel, with support for up to four channels for four dominant speakers. You will also get a participantRawID that you can use to determine the speaker.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/voice-video-calling/includes/call-automation-media/media-streaming-quickstart-csharp.md
+42-57Lines changed: 42 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,68 +66,53 @@ The sample below demonstrates how to listen to media stream using your websocket
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/voice-video-calling/media-streaming.md
+17-28Lines changed: 17 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,42 +33,31 @@ Get started with using audio streams through Azure Communication Services Media
33
33
When ACS has received the URL for your WebSocket server, it will create a connection to it. Once ACS has successfully connected to your WebSocket server, it will send through the first data packet which contains metadata regarding the incoming media packets.
34
34
35
35
```code
36
-
/**
37
-
* The first message upon WebSocket connection will be the metadata packet
38
-
* which contains the subscriptionId and audio format
39
-
*/
40
-
public class AudioMetadataSample {
41
-
public string kind; // What kind of data this is, e.g. AudioMetadata, AudioData.
42
-
public AudioMetadata audioMetadata;
43
-
}
44
-
45
-
public class AudioMetadata {
46
-
public string subscriptionId // unique identifier for a subscription request
47
-
public string encoding; // PCM only supported
48
-
public int sampleRate; // 16000 default
49
-
public int channels; // 1 default
50
-
public int length; // 640 default
36
+
{
37
+
"kind": <string> // What kind of data this is, e.g. AudioMetadata, AudioData.
38
+
"audioMetadata": {
39
+
"subscriptionId": <string>, // unique identifier for a subscription request
40
+
"encoding":<string>, // PCM only supported
41
+
"sampleRate": <int>, // 16000 default
42
+
"channels": <int>, // 1 default
43
+
"length": <int> // 640 default
44
+
}
51
45
}
52
46
```
53
47
54
48
## Audio streaming schema
55
49
After sending through the metadata packet, ACS will start streaming audio media to your WebSocket server. Below is an example of what the media object your server will receive looks like.
56
50
57
51
```code
58
-
/**
59
-
* The audio buffer object which is then serialized to JSON format
60
-
*/
61
-
public class AudioDataSample {
62
-
public string kind; // What kind of data this is, e.g. AudioMetadata, AudioData.
63
-
public AudioData audioData;
52
+
{
53
+
"kind": <string>, // What kind of data this is, e.g. AudioMetadata, AudioData.
54
+
"audioData":{
55
+
"data": <string>, // Base64 Encoded audio buffer data
56
+
"timestamp": <string>, // In ISO 8601 format (yyyy-mm-ddThh:mm:ssZ)
57
+
"participantRawID": <string>,
58
+
"silent": <boolean> // Indicates if the received audio buffer contains only silence.
59
+
}
64
60
}
65
-
66
-
public class AudioData {
67
-
public string data; // Base64 Encoded audio buffer data
68
-
public string timestamp; // In ISO 8601 format (yyyy-mm-ddThh:mm:ssZ)
69
-
public string participantRawID;
70
-
public boolean silent; // Indicates if the received audio buffer contains only silence.
0 commit comments