@voicethere/agent 0.36.0 → 0.37.0
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/README.md +16 -4
- package/dist/agent.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runner-forwarded-events.d.ts +6 -0
- package/dist/runner-forwarded-events.d.ts.map +1 -1
- package/dist/runner-forwarded-events.js +14 -0
- package/dist/runner-forwarded-events.js.map +1 -1
- package/dist/templates/game-sync/agent.js +256 -52
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +8 -3
- package/dist/templates/registry.js.map +1 -1
- package/dist/templates/voice-starter/agent.js +3 -3
- package/dist/templates/world-sync/agent.js +22 -1
- package/dist/templates/world-sync-binary/agent.js +22 -1
- package/eject/llm/loop.ts +1 -1
- package/package.json +30 -1
- package/templates/README.md +11 -11
- package/templates/game-sync/README.md +13 -4
- package/templates/game-sync/agent.ts +175 -60
- package/templates/game-sync/protocol.ts +3 -0
- package/templates/game-sync/quantize.ts +53 -0
- package/templates/game-sync/redis.ts +51 -1
- package/templates/game-sync/sim.ts +6 -0
- package/templates/game-sync/world-layout.ts +191 -0
- package/templates/redis-sync/README.md +7 -5
- package/templates/redis-sync/agent.ts +77 -65
- package/templates/redis-sync/quantize.ts +53 -0
- package/templates/redis-sync/quantized-frames.vectors.json +249 -0
- package/templates/redis-sync/world-layout.ts +278 -116
- package/templates/voice-starter/agent.ts +3 -5
- package/templates/world-sync/README.md +1 -1
- package/templates/world-sync/agent.ts +39 -4
- package/templates/world-sync-binary/README.md +1 -1
- package/templates/world-sync-binary/agent.ts +29 -2
package/README.md
CHANGED
|
@@ -253,12 +253,24 @@ The runner forwards these SDK `SpeechEvent` payloads on `speech_event.event` (`e
|
|
|
253
253
|
| `agent_speaking_start` | Know when TTS playback starts |
|
|
254
254
|
| `agent_speaking_end` | Know when TTS playback ends |
|
|
255
255
|
| `tts_wait` | Playback is waiting for speech synthesis |
|
|
256
|
-
| `agent_speak_failed` | A `speak` could not be synthesized (`
|
|
256
|
+
| `agent_speak_failed` | A `speak` could not be synthesized (`reason` holds why) |
|
|
257
257
|
| `tts_phrase_cache_hit` | A phrase came from the TTS phrase cache |
|
|
258
|
-
| `speaker_gate_ready` | The speaker
|
|
258
|
+
| `speaker_gate_ready` | The speaker model finished loading (`waitMs`, no text) |
|
|
259
259
|
| `barge_in` | The caller interrupted agent playback. Not sent for the cut the runner makes itself when it handles a `speak_cancel`. |
|
|
260
260
|
|
|
261
|
-
|
|
261
|
+
Sent only when the project uses language switching (exported as `RUNNER_LANGUAGE_SWITCH_EVENTS`):
|
|
262
|
+
|
|
263
|
+
| Event | Typical use in custom agent |
|
|
264
|
+
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
265
|
+
| `voice_language_switching` | A runner language switch has started |
|
|
266
|
+
| `voice_language_changed` | The switch was applied (`onVoiceLanguageChanged`) |
|
|
267
|
+
| `voice_language_switch_failed` | The switch failed and the session stays in the previous language; details below |
|
|
268
|
+
| `user_speech_final_held` | A final was held while a switch or language check runs (`reason` is `language_switch` or `language_check`, `holdMs`) |
|
|
269
|
+
| `user_speech_final_released` | The held final was released |
|
|
270
|
+
| `stt_hold_started` | The runner paused STT for the switch |
|
|
271
|
+
| `stt_hold_ended` | The runner resumed STT |
|
|
272
|
+
|
|
273
|
+
Other types are not delivered in cloud, apart from these: partial transcripts (`user_speech_partial`), VAD and speaking state (`vad_triggered`, `user_speaking_start`, `user_speaking_end`), `stt_stream_*`, `user_stt_*` and `error` stay inside the runner.
|
|
262
274
|
|
|
263
275
|
`voice_language_switch_failed` carries `from`, `to`, `reason`, `error`, `fallbackLanguage` and `attempts`. When the new language's speech models do not start in time (two attempts of about 20 s), `reason` is `"language_unavailable"`, `error` holds the underlying cause (`pool_timeout` or `pool_unavailable`) and the session continues in `fallbackLanguage`. The event arrives before the caller's held speech is transcribed in the previous language. `setVoiceLanguage` resolves `{ ok: false, reason: "language_unavailable" }` in the same case.
|
|
264
276
|
|
|
@@ -670,7 +682,7 @@ The runtime processes parent IPC **in order per `sessionId`** while different se
|
|
|
670
682
|
|
|
671
683
|
For isolated voice agents (default), leave **`shared_child_per_session`** disabled — each session gets its own child process.
|
|
672
684
|
|
|
673
|
-
See [`templates/game-sync/agent.ts`](./templates/game-sync/agent.ts) for a data-only authoritative server example (60Hz server-side movement + collisions, client render-only). Start simpler with [`templates/world-sync`](./templates/world-sync) (JSON) or [`templates/world-sync-binary`](./templates/world-sync-binary) (`ArrayBuffer` poses).
|
|
685
|
+
See [`templates/game-sync/agent.ts`](./templates/game-sync/agent.ts) for a data-only authoritative server example (60Hz server-side movement + collisions, 30Hz quantized snapshots, client render-only). Start simpler with [`templates/world-sync`](./templates/world-sync) (JSON) or [`templates/world-sync-binary`](./templates/world-sync-binary) (`ArrayBuffer` poses).
|
|
674
686
|
|
|
675
687
|
### Game servers + parent/child IPC payload size guidance
|
|
676
688
|
|
package/dist/agent.js
CHANGED
|
@@ -1510,10 +1510,8 @@ function peerState(sessionId) {
|
|
|
1510
1510
|
let state = peers.get(sessionId);
|
|
1511
1511
|
if (!state) {
|
|
1512
1512
|
state = {
|
|
1513
|
-
userSpeaking: false,
|
|
1514
1513
|
agentSpeaking: false,
|
|
1515
|
-
lastPartial: ""
|
|
1516
|
-
sttActive: false
|
|
1514
|
+
lastPartial: ""
|
|
1517
1515
|
};
|
|
1518
1516
|
peers.set(sessionId, state);
|
|
1519
1517
|
}
|
|
@@ -1522,6 +1520,8 @@ function peerState(sessionId) {
|
|
|
1522
1520
|
function formatSpeechDetail(speech) {
|
|
1523
1521
|
if (speech.text) return `"${speech.text}"`;
|
|
1524
1522
|
if (speech.error) return speech.error;
|
|
1523
|
+
const reason = speech.reason;
|
|
1524
|
+
if (reason) return reason;
|
|
1525
1525
|
return "";
|
|
1526
1526
|
}
|
|
1527
1527
|
function handleSpeechEvent(sessionId, speech) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { SpeechEvent, SpeechEventListener, SpeechEventName, SpeechEventType, } from "@node-webrtc-rust/sdk/voice";
|
|
2
2
|
export { ALLOWED_CHILD_ENV_KEYS, MIX_REQUIRES_VOICE_PLUS_DATA, TTS_POSE_REQUIRES_VOICE, type AgentErrorMessage, type AgentLogLevel, type AgentLogMessage, type NodeWarningMessage, type AllowedChildEnvKey, type ChildToParentMessage, type ParentToChildMessage, type SessionEndMessage, type SessionStartMessage, type RecordReplyMessage, type SendToClientMessage, type DataChannelMessageMessage, type DataChannelBinaryMessage, type DataChannelKind, type DisconnectClientMessage, type IdleTimeoutDoneMessage, type IdleTimeoutMessage, type SessionTimeLimitMessage, type SessionTimeLimitDoneMessage, type SessionTimeLimitControlMessage, type SessionTimeLimitControlAckMessage, type RecordingControlMessage, type RecordingControlAckMessage, type RecordingControlAction, type RecordingControlResult, type ConversationHistoryControlMessage, type ConversationHistoryControlAckMessage, type ConversationHistoryControlResult, type PlayMessage, type PlayStatusMessage, type PlayStopMessage, type PlayPoseMessage, type PlayAckMessage, type PlayStatusAckMessage, type PlayStopAckMessage, type PlayPoseAckMessage, type PlayStatusState, type PlayResult, type GetPlayResult, type StopPlayResult, type PlayPoseResult, type MixControlMessage, type MixControlAckMessage, type MixControlAction, type MixControlResult, type ClientMixStatus, type ClientPose, type MixPlacement, type MixPose, type SttControlMessage, type SttControlAckMessage, type SttControlResult, type VoiceControlScope, type VoiceVendorSelection, type VoiceSwitchFailureReason, type VoiceLanguageControlMessage, type VoiceLanguageControlAckMessage, type VoiceLanguageResult, type SpeakerGateMode, type SpeakerGateBargeInPolicy, type SpeakerGateInfo, type SpeakerVerdict, type SetSpeakerGateResult, type ResetSpeakerEnrollmentResult, type UserSpeechIgnoredEvent, type UserUtteranceSplitEvent, type UserSpeechFinalReason, type VoiceLanguagePrepareMessage, type VoiceLanguagePrepareResultMessage, type VoiceLanguagePrepareResult, type VoiceReplayLastMessage, type VoiceReplayLastResultMessage, type VoiceReplayResult, type VoiceLanguageSwitchSettings, type VoiceLanguageWaitMessageMode, type SendBinaryToClientMessage, type SpeakMessage, type SpeakStatus, type SpeakResultMessage, type SpeakCancelMessage, type BargeInControlMessage, type BargeInControlAckMessage, type AgentStateName, type AgentStateMessage, type AgentInterruptedMessage, type SpeechEventMessage, type WebhookMessage, type UserIdentifiedMessage, type UserHistoryRequestMessage, type UserHistoryResponseMessage, } from "./protocol.js";
|
|
3
|
-
export { RUNNER_FORWARDED_SPEECH_EVENTS } from "./runner-forwarded-events.js";
|
|
3
|
+
export { RUNNER_FORWARDED_SPEECH_EVENTS, RUNNER_LANGUAGE_SWITCH_EVENTS, } from "./runner-forwarded-events.js";
|
|
4
4
|
export { agentLog, addClientToMix, createMixGroup, defineAgent, getUserHistory, getSessionUser, type GetUserHistoryOptions, type UserHistoryResult, type EndUserInfo, type UserHistoryConversation, disableConversationHistory, disconnectClient, enableConversationHistory, getClientMixStatus, getPlay, getService, serviceFetch, type ProjectServiceInfo, isConversationHistoryAvailable, isMixAvailable, isVoiceLanguageSwitchAvailable, isRunnerLidAutoSwitchEnabled, getVoiceLanguage, isTtsPoseAvailable, parseChatText, pauseRecording, play, removeClientFromMix, resumeRecording, recordReply, sendToClient, sendBinaryToClient, setClientPose, setConversationHistoryEnabled, setDefaultMixPlacement, setGlobalMute, setListenerMute, setPositionalMixing, setSttEnabled, setVoiceLanguage, prepareVoiceLanguage, replayLastUtterance, getVoiceLanguageSwitchSettings, setSpeakerGate, resetSpeakerEnrollment, getSpeakerGate, type UserSpeechIgnoredContext, type UserUtteranceSplitContext, type SetVoiceLanguageOptions, setTtsMixPlacement, setTtsPosition, setTtsPose, clearTtsPose, speak, announce, cancelSpeech, setBargeIn, withoutBargeIn, getSessionTimeLimit, setSessionTimeLimit, enableSessionTimeLimit, disableSessionTimeLimit, setAgentState, isSpeakControlAvailable, speakAndChat, startRecording, stopRecording, stopPlay, setPlayPose, isRecordingAvailable, broadcastToClients, broadCastBinaryToClients, type AgentHandlers, type AgentErrorContext, type AgentStartContext, type DataChannelContext, type IdleTimeoutContext, type SessionTimeLimitContext, type SessionTimeLimitResult, type SessionTimeLimitState, type SessionTimeLimitError, type SessionContext, type SpeechContext, type SpeechEventContext, type UserLanguageContext, type VoiceLanguageChangedContext, type WebhookContext, type PlayOptions, type AudioPosition, type SpeakAndChatOptions, type SpeakOptions, type SpeakResult, type SpeakResultStatus, type SpeakHandle, type BargeInResult, type AgentInterruptedContext, PLAY_BYTES_MAX_DECODED_LENGTH, } from "./runtime.js";
|
|
5
5
|
export { toPublicProviderId, toWireProviderId } from "./voice-provider-id.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,eAAe,GAChB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,sB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BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ALLOWED_CHILD_ENV_KEYS, MIX_REQUIRES_VOICE_PLUS_DATA, TTS_POSE_REQUIRES_VOICE, } from "./protocol.js";
|
|
2
|
-
export { RUNNER_FORWARDED_SPEECH_EVENTS } from "./runner-forwarded-events.js";
|
|
2
|
+
export { RUNNER_FORWARDED_SPEECH_EVENTS, RUNNER_LANGUAGE_SWITCH_EVENTS, } from "./runner-forwarded-events.js";
|
|
3
3
|
export { agentLog, addClientToMix, createMixGroup, defineAgent, getUserHistory, getSessionUser, disableConversationHistory, disconnectClient, enableConversationHistory, getClientMixStatus, getPlay, getService, serviceFetch, isConversationHistoryAvailable, isMixAvailable, isVoiceLanguageSwitchAvailable, isRunnerLidAutoSwitchEnabled, getVoiceLanguage, isTtsPoseAvailable, parseChatText, pauseRecording, play, removeClientFromMix, resumeRecording, recordReply, sendToClient, sendBinaryToClient, setClientPose, setConversationHistoryEnabled, setDefaultMixPlacement, setGlobalMute, setListenerMute, setPositionalMixing, setSttEnabled, setVoiceLanguage, prepareVoiceLanguage, replayLastUtterance, getVoiceLanguageSwitchSettings, setSpeakerGate, resetSpeakerEnrollment, getSpeakerGate, setTtsMixPlacement, setTtsPosition, setTtsPose, clearTtsPose, speak, announce, cancelSpeech, setBargeIn, withoutBargeIn, getSessionTimeLimit, setSessionTimeLimit, enableSessionTimeLimit, disableSessionTimeLimit, setAgentState, isSpeakControlAvailable, speakAndChat, startRecording, stopRecording, stopPlay, setPlayPose, isRecordingAvailable, broadcastToClients, broadCastBinaryToClients, PLAY_BYTES_MAX_DECODED_LENGTH, } from "./runtime.js";
|
|
4
4
|
export { toPublicProviderId, toWireProviderId } from "./voice-provider-id.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,uBAAuB,GA2FxB,MAAM,eAAe,CAAC;AAEvB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,uBAAuB,GA2FxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,cAAc,EACd,WAAW,EACX,cAAc,EACd,cAAc,EAKd,0BAA0B,EAC1B,gBAAgB,EAChB,yBAAyB,EACzB,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,YAAY,EAEZ,8BAA8B,EAC9B,cAAc,EACd,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,IAAI,EACJ,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,6BAA6B,EAC7B,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,cAAc,EACd,sBAAsB,EACtB,cAAc,EAId,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EAyBxB,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -4,4 +4,10 @@
|
|
|
4
4
|
* `user_stt_*`, `user_speaking_*`) stay in the runner and never reach the agent.
|
|
5
5
|
*/
|
|
6
6
|
export declare const RUNNER_FORWARDED_SPEECH_EVENTS: readonly ["user_speech_final", "user_speech_ignored", "user_utterance_split", "user_language", "agent_speaking_start", "agent_speaking_end", "tts_wait", "agent_speak_failed", "tts_phrase_cache_hit", "speaker_gate_ready", "barge_in"];
|
|
7
|
+
/**
|
|
8
|
+
* Speech event types the runner sends to the agent only when the project uses
|
|
9
|
+
* language switching. They do not pass the runner's speech event filter; the
|
|
10
|
+
* language switch delivers them itself.
|
|
11
|
+
*/
|
|
12
|
+
export declare const RUNNER_LANGUAGE_SWITCH_EVENTS: readonly ["voice_language_switching", "voice_language_changed", "voice_language_switch_failed", "user_speech_final_held", "user_speech_final_released", "stt_hold_started", "stt_hold_ended"];
|
|
7
13
|
//# sourceMappingURL=runner-forwarded-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-forwarded-events.d.ts","sourceRoot":"","sources":["../src/runner-forwarded-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,0OAYjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"runner-forwarded-events.d.ts","sourceRoot":"","sources":["../src/runner-forwarded-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,0OAYjC,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,+LAQhC,CAAC"}
|
|
@@ -16,4 +16,18 @@ export const RUNNER_FORWARDED_SPEECH_EVENTS = [
|
|
|
16
16
|
"speaker_gate_ready",
|
|
17
17
|
"barge_in",
|
|
18
18
|
];
|
|
19
|
+
/**
|
|
20
|
+
* Speech event types the runner sends to the agent only when the project uses
|
|
21
|
+
* language switching. They do not pass the runner's speech event filter; the
|
|
22
|
+
* language switch delivers them itself.
|
|
23
|
+
*/
|
|
24
|
+
export const RUNNER_LANGUAGE_SWITCH_EVENTS = [
|
|
25
|
+
"voice_language_switching",
|
|
26
|
+
"voice_language_changed",
|
|
27
|
+
"voice_language_switch_failed",
|
|
28
|
+
"user_speech_final_held",
|
|
29
|
+
"user_speech_final_released",
|
|
30
|
+
"stt_hold_started",
|
|
31
|
+
"stt_hold_ended",
|
|
32
|
+
];
|
|
19
33
|
//# sourceMappingURL=runner-forwarded-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-forwarded-events.js","sourceRoot":"","sources":["../src/runner-forwarded-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,mBAAmB;IACnB,qBAAqB;IACrB,sBAAsB;IACtB,eAAe;IACf,sBAAsB;IACtB,oBAAoB;IACpB,UAAU;IACV,oBAAoB;IACpB,sBAAsB;IACtB,oBAAoB;IACpB,UAAU;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"runner-forwarded-events.js","sourceRoot":"","sources":["../src/runner-forwarded-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,mBAAmB;IACnB,qBAAqB;IACrB,sBAAsB;IACtB,eAAe;IACf,sBAAsB;IACtB,oBAAoB;IACpB,UAAU;IACV,oBAAoB;IACpB,sBAAsB;IACtB,oBAAoB;IACpB,UAAU;CACF,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,0BAA0B;IAC1B,wBAAwB;IACxB,8BAA8B;IAC9B,wBAAwB;IACxB,4BAA4B;IAC5B,kBAAkB;IAClB,gBAAgB;CACR,CAAC"}
|