ttp-agent-sdk 2.33.5 → 2.34.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -1091,7 +1091,7 @@ voiceSDK.on('domainError', (error) => {
1091
1091
  <li><strong>Format Control:</strong> Request specific audio formats (container, encoding, sample rate, bit depth)</li>
1092
1092
  <li><strong>Automatic Conversion:</strong> SDK automatically converts audio if backend sends different format</li>
1093
1093
  <li><strong>Quality Optimization:</strong> Choose optimal formats for your use case (e.g., 48kHz for high quality, 8kHz for bandwidth savings)</li>
1094
- <li><strong>Backward Compatible:</strong> Works with v1 protocol (set protocolVersion: 1)</li>
1094
+ <li><strong>Protocol Support:</strong> Uses v2 protocol with format negotiation</li>
1095
1095
  </ul>
1096
1096
  </div>
1097
1097
 
@@ -3962,7 +3962,7 @@ String apiKey = System.getenv("TALKTOPC_API_KEY");
3962
3962
 
3963
3963
  VoiceSDK sdk = VoiceSDK.builder()
3964
3964
  .apiKey(apiKey)
3965
- .baseUrl("https://api.talktopc.com") // Optional
3965
+ .baseUrl("https://speech.talktopc.com") // Optional
3966
3966
  .build();</code></pre>
3967
3967
 
3968
3968
  <h3>2. Simple TTS (Blocking)</h3>
@@ -4009,7 +4009,7 @@ sdk.textToSpeechStream(
4009
4009
  <tr>
4010
4010
  <td><code>baseUrl(String)</code></td>
4011
4011
  <td>String</td>
4012
- <td>API base URL (default: https://api.talktopc.com)</td>
4012
+ <td>API base URL (default: https://speech.talktopc.com)</td>
4013
4013
  </tr>
4014
4014
  <tr>
4015
4015
  <td><code>connectTimeout(int)</code></td>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
12
12
 
13
- <title>VoiceSDK Demo - v1 & v2 Support</title>
13
+ <title>VoiceSDK Demo - v2 Support</title>
14
14
 
15
15
  <style>
16
16
 
@@ -617,8 +617,6 @@
617
617
 
618
618
  <option value="v2" selected>v2 (Multi-Codec Support)</option>
619
619
 
620
- <option value="v1">v1 (Legacy)</option>
621
-
622
620
  </select>
623
621
 
624
622
  </div>
@@ -1038,48 +1036,30 @@
1038
1036
  log(`📝 Using variables: ${Object.keys(variables).join(', ')}`, 'info');
1039
1037
  }
1040
1038
 
1041
- let config;
1042
-
1043
- if (sdkVersion === 'v2') {
1044
- if (!VoiceSDK_v2) {
1045
- throw new Error('VoiceSDK_v2 not available. Please rebuild the SDK.');
1046
- }
1047
- log('Initializing SDK v2...', 'info');
1048
-
1049
- // v2 config with output format
1050
- config = {
1051
- ...baseConfig,
1052
- protocolVersion: 2,
1053
- // Output format
1054
- outputContainer: document.getElementById('outputContainer').value,
1055
- outputEncoding: document.getElementById('outputEncoding').value,
1056
- outputSampleRate: parseInt(document.getElementById('outputSampleRate').value),
1057
- outputBitDepth: parseInt(document.getElementById('outputBitDepth').value),
1058
- outputChannels: 1,
1059
- outputFrameDurationMs: parseInt(document.getElementById('outputFrameDurationMs').value),
1060
- // Input format
1061
- sampleRate: 16000,
1062
- channels: 1,
1063
- bitDepth: 16
1064
- };
1065
-
1066
- // Create SDK instance
1067
- sdk = new VoiceSDK_v2(config);
1068
- } else {
1069
- if (!VoiceSDK) {
1070
- throw new Error('VoiceSDK (v1) not available. Please rebuild the SDK.');
1071
- }
1072
- log('Initializing SDK v1...', 'info');
1073
-
1074
- // v1 config (no output format options)
1075
- config = {
1076
- ...baseConfig,
1077
- sampleRate: 16000
1078
- };
1079
-
1080
- // Create SDK instance
1081
- sdk = new VoiceSDK(config);
1039
+ if (!VoiceSDK_v2) {
1040
+ throw new Error('VoiceSDK_v2 not available. Please rebuild the SDK.');
1082
1041
  }
1042
+ log('Initializing SDK v2...', 'info');
1043
+
1044
+ // v2 config with output format
1045
+ const config = {
1046
+ ...baseConfig,
1047
+ protocolVersion: 2,
1048
+ // Output format
1049
+ outputContainer: document.getElementById('outputContainer').value,
1050
+ outputEncoding: document.getElementById('outputEncoding').value,
1051
+ outputSampleRate: parseInt(document.getElementById('outputSampleRate').value),
1052
+ outputBitDepth: parseInt(document.getElementById('outputBitDepth').value),
1053
+ outputChannels: 1,
1054
+ outputFrameDurationMs: parseInt(document.getElementById('outputFrameDurationMs').value),
1055
+ // Input format
1056
+ sampleRate: 16000,
1057
+ channels: 1,
1058
+ bitDepth: 16
1059
+ };
1060
+
1061
+ // Create SDK instance
1062
+ sdk = new VoiceSDK_v2(config);
1083
1063
 
1084
1064
 
1085
1065
 
@@ -1231,7 +1211,7 @@
1231
1211
 
1232
1212
  });
1233
1213
 
1234
- // Handle greeting (v1 and v2)
1214
+ // Handle greeting
1235
1215
  sdk.on('greetingStarted', () => {
1236
1216
  log('🎵 Greeting audio started', 'success');
1237
1217
  });
@@ -271,6 +271,21 @@
271
271
  <span class="badge badge--new">Demo</span>
272
272
  </div>
273
273
  </a>
274
+
275
+ <a href="widget-customization.html" class="test-card">
276
+ <span class="test-card__icon">🎨</span>
277
+ <h3 class="test-card__title">Widget Live Customization</h3>
278
+ <p class="test-card__description">
279
+ Interactive customization tool for the TTP Chat Widget. Click on any element
280
+ to customize colors, sizes, text, and icons. See all available designs and
281
+ get instant code output for your configuration.
282
+ </p>
283
+ <div class="test-card__badges">
284
+ <span class="badge badge--widget">Widget</span>
285
+ <span class="badge badge--sdk">Customization</span>
286
+ <span class="badge badge--new">New</span>
287
+ </div>
288
+ </a>
274
289
  </div>
275
290
  </div>
276
291