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/quickstarts/voice-video-calling/includes/call-automation-media/media-streaming-quickstart-java.md
-59Lines changed: 0 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,62 +102,3 @@ public class WebsocketServer {
102
102
}
103
103
}
104
104
```
105
-
106
-
## Message schema
107
-
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.
108
-
109
-
```code
110
-
/**
111
-
* The first message upon WebSocket connection will be the metadata packet
112
-
* which contains the subscriptionId and audio format
113
-
*/
114
-
public class AudioMetadataSample {
115
-
public string kind; // What kind of data this is, e.g. AudioMetadata, AudioData.
116
-
public AudioMetadata audioMetadata;
117
-
}
118
-
119
-
public class AudioMetadata {
120
-
public string subscriptionId // unique identifier for a subscription request
121
-
public string encoding; // PCM only supported
122
-
public int sampleRate; // 16000 default
123
-
public int channels; // 1 default
124
-
public int length; // 640 default
125
-
}
126
-
```
127
-
128
-
## Audio streaming schema
129
-
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.
130
-
131
-
```code
132
-
/**
133
-
* The audio buffer object which is then serialized to JSON format
134
-
*/
135
-
public class AudioDataSample {
136
-
public string kind; // What kind of data this is, e.g. AudioMetadata, AudioData.
137
-
public AudioData audioData;
138
-
}
139
-
140
-
public class AudioData {
141
-
public string data; // Base64 Encoded audio buffer data
142
-
public string timestamp; // In ISO 8601 format (yyyy-mm-ddThh:mm:ssZ)
143
-
public string participantRawID;
144
-
public boolean silent; // Indicates if the received audio buffer contains only silence.
0 commit comments