@celljs/ta-web 4.27.0 → 4.29.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.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-role.d.ts +9 -4
- package/esm/browser/assistant/assistant-role.js +17 -5
- package/esm/browser/assistant/assistant-task-util.d.ts +6 -0
- package/esm/browser/assistant/assistant-task-util.js +12 -1
- package/esm/browser/assistant/assistant-thread.js +15 -2
- package/esm/browser/assistant/assistant-view.js +4 -1
- package/esm/browser/assistant/assistant.d.ts +2 -1
- package/esm/browser/assistant/assistant.js +9 -7
- package/esm/browser/assistant/call-conversing.d.ts +45 -0
- package/esm/browser/assistant/call-conversing.js +91 -0
- package/esm/browser/assistant/call-face.d.ts +13 -0
- package/esm/browser/assistant/call-face.js +81 -0
- package/esm/browser/assistant/call-keeper.d.ts +8 -4
- package/esm/browser/assistant/call-keeper.js +32 -11
- package/esm/browser/assistant/call-partnering.d.ts +37 -0
- package/esm/browser/assistant/call-partnering.js +79 -0
- package/esm/browser/assistant/call-scenes.d.ts +26 -0
- package/esm/browser/assistant/call-scenes.js +85 -0
- package/esm/browser/assistant/call-screen.d.ts +3 -0
- package/esm/browser/assistant/call-screen.js +15 -0
- package/esm/browser/assistant/mic-sense.d.ts +31 -0
- package/esm/browser/assistant/mic-sense.js +119 -0
- package/esm/browser/assistant/noise-gate.d.ts +32 -0
- package/esm/browser/assistant/noise-gate.js +66 -0
- package/esm/browser/assistant/pcm-util.d.ts +10 -0
- package/esm/browser/assistant/pcm-util.js +55 -0
- package/esm/browser/assistant/read-aloud.d.ts +2 -1
- package/esm/browser/assistant/realtime-voice-protocol.d.ts +84 -0
- package/esm/browser/assistant/realtime-voice-protocol.js +40 -0
- package/esm/browser/assistant/realtime-voice.d.ts +50 -62
- package/esm/browser/assistant/realtime-voice.js +213 -134
- package/esm/browser/assistant/spoken-timeline.d.ts +27 -0
- package/esm/browser/assistant/spoken-timeline.js +49 -0
- package/esm/browser/assistant/voice-call-bar.d.ts +9 -2
- package/esm/browser/assistant/voice-call-bar.js +81 -31
- package/esm/browser/assistant/voice-call-protocol.d.ts +61 -4
- package/esm/browser/assistant/voice-call.d.ts +16 -23
- package/esm/browser/assistant/voice-call.js +134 -117
- package/esm/browser/assistant/voice-reading.d.ts +83 -0
- package/esm/browser/assistant/voice-reading.js +150 -0
- package/esm/browser/avatar/dino-talk.d.ts +15 -0
- package/esm/browser/avatar/dino-talk.js +34 -0
- package/esm/browser/chat/chat-protocol.d.ts +2 -0
- package/esm/browser/chat/chat-shown.d.ts +3 -1
- package/esm/browser/chat/chat-shown.js +25 -3
- package/esm/browser/chat/chat.d.ts +5 -1
- package/esm/browser/chat/chat.js +32 -16
- package/esm/browser/components/account-menu.d.ts +6 -16
- package/esm/browser/components/account-menu.js +47 -101
- package/esm/browser/components/app-contexts.js +3 -2
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-box-protocol.d.ts +2 -0
- package/esm/browser/components/composer-box.js +20 -1
- package/esm/browser/components/composer-emoji.d.ts +22 -0
- package/esm/browser/components/composer-emoji.js +50 -0
- package/esm/browser/components/conversation-scroll-util.d.ts +8 -1
- package/esm/browser/components/conversation-scroll-util.js +21 -0
- package/esm/browser/components/conversation-scroll.js +10 -11
- package/esm/browser/components/discover-view.d.ts +4 -3
- package/esm/browser/components/discover-view.js +5 -4
- package/esm/browser/components/emoji-panel.d.ts +22 -0
- package/esm/browser/components/emoji-panel.js +54 -0
- package/esm/browser/components/gallery.js +28 -7
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/image-pull.d.ts +64 -0
- package/esm/browser/components/image-pull.js +202 -0
- package/esm/browser/components/kept-call-bar.js +2 -1
- package/esm/browser/components/lightbox.d.ts +1 -1
- package/esm/browser/components/lightbox.js +57 -2
- package/esm/browser/components/markdown.d.ts +8 -1
- package/esm/browser/components/markdown.js +12 -4
- package/esm/browser/components/me-rows.d.ts +24 -0
- package/esm/browser/components/me-rows.js +19 -0
- package/esm/browser/components/me-view.d.ts +2 -1
- package/esm/browser/components/me-view.js +3 -2
- package/esm/browser/components/message-list.js +47 -7
- package/esm/browser/components/message-steps.js +13 -0
- package/esm/browser/components/nav-places.js +1 -1
- package/esm/browser/components/partner-row.js +2 -1
- package/esm/browser/components/relay-services.d.ts +9 -3
- package/esm/browser/components/relay-services.js +73 -35
- package/esm/browser/components/session-view.js +4 -2
- package/esm/browser/components/settings-choices.js +3 -0
- package/esm/browser/components/settings-controls.d.ts +13 -0
- package/esm/browser/components/settings-controls.js +19 -0
- package/esm/browser/components/settings-more.d.ts +1 -1
- package/esm/browser/components/settings-more.js +28 -39
- package/esm/browser/components/settings-parts.d.ts +4 -2
- package/esm/browser/components/settings-parts.js +16 -9
- package/esm/browser/components/settings-view.js +2 -6
- package/esm/browser/components/ta-avatar.d.ts +15 -1
- package/esm/browser/components/ta-avatar.js +38 -5
- package/esm/browser/components/voice-services.js +6 -1
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/device/file-save.d.ts +31 -0
- package/esm/browser/device/file-save.js +80 -0
- package/esm/browser/extension/extension-view.d.ts +2 -0
- package/esm/browser/extension/extension-view.js +2 -0
- package/esm/browser/extension/web-api-call.d.ts +109 -2
- package/esm/browser/extension/web-api-components.d.ts +4 -0
- package/esm/browser/extension/web-api-contributions.d.ts +14 -14
- package/esm/browser/extension/web-api-desktop.d.ts +16 -1
- package/esm/browser/extension/web-api-desktop.js +1 -0
- package/esm/browser/extension/web-api-partners.d.ts +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +8 -10
- package/esm/browser/extension/web-extension-code.d.ts +15 -8
- package/esm/browser/extension/web-extension-code.js +25 -27
- package/esm/browser/extension/web-extension-context.js +4 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +10 -1
- package/esm/browser/extension/web-extension-protocol.js +1 -0
- package/esm/browser/extension/web-extension-run.d.ts +4 -2
- package/esm/browser/extension/web-extension-run.js +10 -4
- package/esm/browser/extension/web-extensions-running.js +7 -6
- package/esm/browser/extension/web-pages.d.ts +2 -0
- package/esm/browser/extension/web-pages.js +2 -0
- package/esm/browser/i18n/en/account.d.ts +202 -0
- package/esm/browser/i18n/en/account.js +205 -0
- package/esm/browser/i18n/en/assistant.d.ts +129 -0
- package/esm/browser/i18n/en/assistant.js +130 -0
- package/esm/browser/i18n/en/call.d.ts +86 -0
- package/esm/browser/i18n/en/call.js +87 -0
- package/esm/browser/i18n/en/chat.d.ts +213 -0
- package/esm/browser/i18n/en/chat.js +214 -0
- package/esm/browser/i18n/en/common.d.ts +99 -0
- package/esm/browser/i18n/en/common.js +101 -0
- package/esm/browser/i18n/en/console.d.ts +230 -0
- package/esm/browser/i18n/en/console.js +232 -0
- package/esm/browser/i18n/en/discover.d.ts +117 -0
- package/esm/browser/i18n/en/discover.js +119 -0
- package/esm/browser/i18n/en/service.d.ts +242 -0
- package/esm/browser/i18n/en/service.js +245 -0
- package/esm/browser/i18n/en/settings.d.ts +213 -0
- package/esm/browser/i18n/en/settings.js +214 -0
- package/esm/browser/i18n/en/tools.d.ts +85 -0
- package/esm/browser/i18n/en/tools.js +87 -0
- package/esm/browser/i18n/ja/account.d.ts +2 -0
- package/esm/browser/i18n/ja/account.js +202 -0
- package/esm/browser/i18n/ja/assistant.d.ts +2 -0
- package/esm/browser/i18n/ja/assistant.js +129 -0
- package/esm/browser/i18n/ja/call.d.ts +2 -0
- package/esm/browser/i18n/ja/call.js +86 -0
- package/esm/browser/i18n/ja/chat.d.ts +2 -0
- package/esm/browser/i18n/ja/chat.js +213 -0
- package/esm/browser/i18n/ja/common.d.ts +2 -0
- package/esm/browser/i18n/ja/common.js +99 -0
- package/esm/browser/i18n/ja/console.d.ts +2 -0
- package/esm/browser/i18n/ja/console.js +230 -0
- package/esm/browser/i18n/ja/discover.d.ts +2 -0
- package/esm/browser/i18n/ja/discover.js +117 -0
- package/esm/browser/i18n/ja/service.d.ts +2 -0
- package/esm/browser/i18n/ja/service.js +242 -0
- package/esm/browser/i18n/ja/settings.d.ts +2 -0
- package/esm/browser/i18n/ja/settings.js +213 -0
- package/esm/browser/i18n/ja/tools.d.ts +2 -0
- package/esm/browser/i18n/ja/tools.js +85 -0
- package/esm/browser/i18n/locales.d.ts +1150 -1131
- package/esm/browser/i18n/messages-ja.js +20 -1567
- package/esm/browser/i18n/messages-zh-tw.d.ts +0 -1
- package/esm/browser/i18n/messages-zh-tw.js +20 -1568
- package/esm/browser/i18n/messages.d.ts +1153 -1131
- package/esm/browser/i18n/messages.js +44 -3145
- package/esm/browser/i18n/zh/account.d.ts +2 -0
- package/esm/browser/i18n/zh/account.js +203 -0
- package/esm/browser/i18n/zh/assistant.d.ts +2 -0
- package/esm/browser/i18n/zh/assistant.js +129 -0
- package/esm/browser/i18n/zh/call.d.ts +2 -0
- package/esm/browser/i18n/zh/call.js +86 -0
- package/esm/browser/i18n/zh/chat.d.ts +2 -0
- package/esm/browser/i18n/zh/chat.js +213 -0
- package/esm/browser/i18n/zh/common.d.ts +2 -0
- package/esm/browser/i18n/zh/common.js +99 -0
- package/esm/browser/i18n/zh/console.d.ts +2 -0
- package/esm/browser/i18n/zh/console.js +230 -0
- package/esm/browser/i18n/zh/discover.d.ts +2 -0
- package/esm/browser/i18n/zh/discover.js +117 -0
- package/esm/browser/i18n/zh/service.d.ts +2 -0
- package/esm/browser/i18n/zh/service.js +242 -0
- package/esm/browser/i18n/zh/settings.d.ts +2 -0
- package/esm/browser/i18n/zh/settings.js +213 -0
- package/esm/browser/i18n/zh/tools.d.ts +2 -0
- package/esm/browser/i18n/zh/tools.js +86 -0
- package/esm/browser/i18n/zh-tw/account.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/account.js +202 -0
- package/esm/browser/i18n/zh-tw/assistant.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/assistant.js +129 -0
- package/esm/browser/i18n/zh-tw/call.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/call.js +86 -0
- package/esm/browser/i18n/zh-tw/chat.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/chat.js +213 -0
- package/esm/browser/i18n/zh-tw/common.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/common.js +99 -0
- package/esm/browser/i18n/zh-tw/console.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/console.js +230 -0
- package/esm/browser/i18n/zh-tw/discover.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/discover.js +117 -0
- package/esm/browser/i18n/zh-tw/service.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/service.js +242 -0
- package/esm/browser/i18n/zh-tw/settings.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/settings.js +213 -0
- package/esm/browser/i18n/zh-tw/tools.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/tools.js +85 -0
- package/esm/browser/markdown/code-renderers.d.ts +2 -0
- package/esm/browser/markdown/code-renderers.js +2 -0
- package/esm/browser/offline/device-values.d.ts +4 -0
- package/esm/browser/offline/device-values.js +10 -0
- package/esm/browser/pwa/page-build.d.ts +15 -0
- package/esm/browser/pwa/page-build.js +45 -0
- package/esm/browser/screen/page-answers.d.ts +2 -1
- package/esm/browser/screen/page-answers.js +7 -4
- package/esm/browser/settings/settings-protocol.d.ts +4 -0
- package/esm/browser/settings/settings-protocol.js +4 -0
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +3 -0
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +1 -1
- package/esm/browser/style/conversation-column.d.ts +1 -1
- package/esm/browser/style/conversation-column.js +17 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +11 -1
- package/esm/browser/style/device.js +1 -0
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +1 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +135 -57
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +0 -7
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +8 -0
- package/esm/browser/style/video-call.d.ts +2 -0
- package/esm/browser/style/video-call.js +63 -0
- package/esm/browser/style.js +2 -0
- package/esm/browser/util/call-transcript.d.ts +16 -0
- package/esm/browser/util/call-transcript.js +110 -0
- package/esm/browser/util/desktop.d.ts +10 -1
- package/esm/browser/util/desktop.js +10 -0
- package/esm/browser/util/image-pull.d.ts +61 -0
- package/esm/browser/util/image-pull.js +88 -0
- package/esm/browser/util/process.d.ts +6 -0
- package/esm/browser/util/process.js +18 -5
- package/esm/browser/util/spoken.d.ts +3 -3
- package/esm/browser/util/spoken.js +4 -4
- package/esm/browser/video-call/call-camera.d.ts +59 -0
- package/esm/browser/video-call/call-camera.js +188 -0
- package/esm/browser/video-call/call-people.d.ts +21 -0
- package/esm/browser/video-call/call-people.js +29 -0
- package/esm/browser/video-call/call-window.d.ts +19 -0
- package/esm/browser/video-call/call-window.js +80 -0
- package/esm/browser/video-call/clip-plan.d.ts +56 -0
- package/esm/browser/video-call/clip-plan.js +76 -0
- package/esm/browser/video-call/face-camera.d.ts +93 -0
- package/esm/browser/video-call/face-camera.js +192 -0
- package/esm/browser/video-call/face-files.d.ts +69 -0
- package/esm/browser/video-call/face-files.js +132 -0
- package/esm/browser/video-call/face-moves.d.ts +68 -0
- package/esm/browser/video-call/face-moves.js +180 -0
- package/esm/browser/video-call/face-stage.d.ts +139 -0
- package/esm/browser/video-call/face-stage.js +219 -0
- package/esm/browser/video-call/mouth-layer.d.ts +81 -0
- package/esm/browser/video-call/mouth-layer.js +241 -0
- package/esm/browser/video-call/video-call-view.d.ts +19 -0
- package/esm/browser/video-call/video-call-view.js +254 -0
- package/esm/browser/video-call/video-face.d.ts +19 -0
- package/esm/browser/video-call/video-face.js +471 -0
- package/esm/browser/workbench-hosts.d.ts +1 -0
- package/esm/browser/workbench-protocol.d.ts +2 -0
- package/esm/browser/workbench-util.d.ts +5 -0
- package/esm/browser/workbench-util.js +18 -0
- package/esm/browser/workbench.d.ts +14 -0
- package/esm/browser/workbench.js +73 -6
- package/lib/browser/assistant/assistant-role.d.ts +9 -4
- package/lib/browser/assistant/assistant-role.js +17 -5
- package/lib/browser/assistant/assistant-task-util.d.ts +6 -0
- package/lib/browser/assistant/assistant-task-util.js +11 -0
- package/lib/browser/assistant/assistant-thread.js +15 -2
- package/lib/browser/assistant/assistant-view.js +3 -0
- package/lib/browser/assistant/assistant.d.ts +2 -1
- package/lib/browser/assistant/assistant.js +9 -7
- package/lib/browser/assistant/call-conversing.d.ts +46 -0
- package/lib/browser/assistant/call-conversing.js +96 -0
- package/lib/browser/assistant/call-face.d.ts +14 -0
- package/lib/browser/assistant/call-face.js +117 -0
- package/lib/browser/assistant/call-keeper.d.ts +8 -4
- package/lib/browser/assistant/call-keeper.js +32 -11
- package/lib/browser/assistant/call-partnering.d.ts +38 -0
- package/lib/browser/assistant/call-partnering.js +83 -0
- package/lib/browser/assistant/call-scenes.d.ts +27 -0
- package/lib/browser/assistant/call-scenes.js +88 -0
- package/lib/browser/assistant/call-screen.d.ts +3 -0
- package/lib/browser/assistant/call-screen.js +15 -0
- package/lib/browser/assistant/mic-sense.d.ts +32 -0
- package/lib/browser/assistant/mic-sense.js +123 -0
- package/lib/browser/assistant/noise-gate.d.ts +33 -0
- package/lib/browser/assistant/noise-gate.js +71 -0
- package/lib/browser/assistant/pcm-util.d.ts +11 -0
- package/lib/browser/assistant/pcm-util.js +58 -0
- package/lib/browser/assistant/read-aloud.d.ts +2 -1
- package/lib/browser/assistant/realtime-voice-protocol.d.ts +85 -0
- package/lib/browser/assistant/realtime-voice-protocol.js +43 -0
- package/lib/browser/assistant/realtime-voice.d.ts +50 -62
- package/lib/browser/assistant/realtime-voice.js +217 -138
- package/lib/browser/assistant/spoken-timeline.d.ts +28 -0
- package/lib/browser/assistant/spoken-timeline.js +53 -0
- package/lib/browser/assistant/voice-call-bar.d.ts +9 -2
- package/lib/browser/assistant/voice-call-bar.js +81 -30
- package/lib/browser/assistant/voice-call-protocol.d.ts +61 -4
- package/lib/browser/assistant/voice-call.d.ts +16 -23
- package/lib/browser/assistant/voice-call.js +134 -117
- package/lib/browser/assistant/voice-reading.d.ts +84 -0
- package/lib/browser/assistant/voice-reading.js +156 -0
- package/lib/browser/avatar/dino-talk.d.ts +16 -0
- package/lib/browser/avatar/dino-talk.js +37 -0
- package/lib/browser/chat/chat-protocol.d.ts +2 -0
- package/lib/browser/chat/chat-shown.d.ts +3 -1
- package/lib/browser/chat/chat-shown.js +25 -3
- package/lib/browser/chat/chat.d.ts +5 -1
- package/lib/browser/chat/chat.js +32 -16
- package/lib/browser/components/account-menu.d.ts +6 -16
- package/lib/browser/components/account-menu.js +45 -99
- package/lib/browser/components/app-contexts.js +2 -1
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-box-protocol.d.ts +2 -0
- package/lib/browser/components/composer-box.js +20 -1
- package/lib/browser/components/composer-emoji.d.ts +23 -0
- package/lib/browser/components/composer-emoji.js +87 -0
- package/lib/browser/components/conversation-scroll-util.d.ts +8 -1
- package/lib/browser/components/conversation-scroll-util.js +21 -0
- package/lib/browser/components/conversation-scroll.js +10 -11
- package/lib/browser/components/discover-view.d.ts +4 -3
- package/lib/browser/components/discover-view.js +5 -4
- package/lib/browser/components/emoji-panel.d.ts +23 -0
- package/lib/browser/components/emoji-panel.js +90 -0
- package/lib/browser/components/gallery.js +28 -7
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/image-pull.d.ts +65 -0
- package/lib/browser/components/image-pull.js +206 -0
- package/lib/browser/components/kept-call-bar.js +2 -1
- package/lib/browser/components/lightbox.d.ts +1 -1
- package/lib/browser/components/lightbox.js +57 -2
- package/lib/browser/components/markdown.d.ts +8 -1
- package/lib/browser/components/markdown.js +11 -3
- package/lib/browser/components/me-rows.d.ts +25 -0
- package/lib/browser/components/me-rows.js +22 -0
- package/lib/browser/components/me-view.d.ts +2 -1
- package/lib/browser/components/me-view.js +3 -2
- package/lib/browser/components/message-list.js +46 -6
- package/lib/browser/components/message-steps.js +13 -0
- package/lib/browser/components/nav-places.js +1 -1
- package/lib/browser/components/partner-row.js +2 -1
- package/lib/browser/components/relay-services.d.ts +9 -3
- package/lib/browser/components/relay-services.js +71 -33
- package/lib/browser/components/session-view.js +3 -1
- package/lib/browser/components/settings-choices.js +3 -0
- package/lib/browser/components/settings-controls.d.ts +13 -0
- package/lib/browser/components/settings-controls.js +19 -0
- package/lib/browser/components/settings-more.d.ts +1 -1
- package/lib/browser/components/settings-more.js +27 -38
- package/lib/browser/components/settings-parts.d.ts +4 -2
- package/lib/browser/components/settings-parts.js +15 -8
- package/lib/browser/components/settings-view.js +2 -6
- package/lib/browser/components/ta-avatar.d.ts +15 -1
- package/lib/browser/components/ta-avatar.js +38 -5
- package/lib/browser/components/voice-services.js +5 -0
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/device/file-save.d.ts +32 -0
- package/lib/browser/device/file-save.js +83 -0
- package/lib/browser/extension/extension-view.d.ts +2 -0
- package/lib/browser/extension/extension-view.js +3 -1
- package/lib/browser/extension/web-api-call.d.ts +109 -2
- package/lib/browser/extension/web-api-components.d.ts +4 -0
- package/lib/browser/extension/web-api-contributions.d.ts +14 -14
- package/lib/browser/extension/web-api-desktop.d.ts +16 -1
- package/lib/browser/extension/web-api-desktop.js +1 -0
- package/lib/browser/extension/web-api-partners.d.ts +2 -0
- package/lib/browser/extension/web-extension-api.d.ts +8 -10
- package/lib/browser/extension/web-extension-code.d.ts +15 -8
- package/lib/browser/extension/web-extension-code.js +25 -27
- package/lib/browser/extension/web-extension-context.js +4 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +10 -1
- package/lib/browser/extension/web-extension-protocol.js +1 -0
- package/lib/browser/extension/web-extension-run.d.ts +4 -2
- package/lib/browser/extension/web-extension-run.js +10 -4
- package/lib/browser/extension/web-extensions-running.js +7 -6
- package/lib/browser/extension/web-pages.d.ts +2 -0
- package/lib/browser/extension/web-pages.js +2 -0
- package/lib/browser/i18n/en/account.d.ts +203 -0
- package/lib/browser/i18n/en/account.js +208 -0
- package/lib/browser/i18n/en/assistant.d.ts +130 -0
- package/lib/browser/i18n/en/assistant.js +133 -0
- package/lib/browser/i18n/en/call.d.ts +87 -0
- package/lib/browser/i18n/en/call.js +90 -0
- package/lib/browser/i18n/en/chat.d.ts +214 -0
- package/lib/browser/i18n/en/chat.js +217 -0
- package/lib/browser/i18n/en/common.d.ts +100 -0
- package/lib/browser/i18n/en/common.js +104 -0
- package/lib/browser/i18n/en/console.d.ts +231 -0
- package/lib/browser/i18n/en/console.js +235 -0
- package/lib/browser/i18n/en/discover.d.ts +118 -0
- package/lib/browser/i18n/en/discover.js +122 -0
- package/lib/browser/i18n/en/service.d.ts +243 -0
- package/lib/browser/i18n/en/service.js +248 -0
- package/lib/browser/i18n/en/settings.d.ts +214 -0
- package/lib/browser/i18n/en/settings.js +217 -0
- package/lib/browser/i18n/en/tools.d.ts +86 -0
- package/lib/browser/i18n/en/tools.js +90 -0
- package/lib/browser/i18n/ja/account.d.ts +3 -0
- package/lib/browser/i18n/ja/account.js +205 -0
- package/lib/browser/i18n/ja/assistant.d.ts +3 -0
- package/lib/browser/i18n/ja/assistant.js +132 -0
- package/lib/browser/i18n/ja/call.d.ts +3 -0
- package/lib/browser/i18n/ja/call.js +89 -0
- package/lib/browser/i18n/ja/chat.d.ts +3 -0
- package/lib/browser/i18n/ja/chat.js +216 -0
- package/lib/browser/i18n/ja/common.d.ts +3 -0
- package/lib/browser/i18n/ja/common.js +102 -0
- package/lib/browser/i18n/ja/console.d.ts +3 -0
- package/lib/browser/i18n/ja/console.js +233 -0
- package/lib/browser/i18n/ja/discover.d.ts +3 -0
- package/lib/browser/i18n/ja/discover.js +120 -0
- package/lib/browser/i18n/ja/service.d.ts +3 -0
- package/lib/browser/i18n/ja/service.js +245 -0
- package/lib/browser/i18n/ja/settings.d.ts +3 -0
- package/lib/browser/i18n/ja/settings.js +216 -0
- package/lib/browser/i18n/ja/tools.d.ts +3 -0
- package/lib/browser/i18n/ja/tools.js +88 -0
- package/lib/browser/i18n/locales.d.ts +1150 -1131
- package/lib/browser/i18n/messages-ja.js +20 -1567
- package/lib/browser/i18n/messages-zh-tw.d.ts +0 -1
- package/lib/browser/i18n/messages-zh-tw.js +20 -1568
- package/lib/browser/i18n/messages.d.ts +1153 -1131
- package/lib/browser/i18n/messages.js +44 -3145
- package/lib/browser/i18n/zh/account.d.ts +3 -0
- package/lib/browser/i18n/zh/account.js +206 -0
- package/lib/browser/i18n/zh/assistant.d.ts +3 -0
- package/lib/browser/i18n/zh/assistant.js +132 -0
- package/lib/browser/i18n/zh/call.d.ts +3 -0
- package/lib/browser/i18n/zh/call.js +89 -0
- package/lib/browser/i18n/zh/chat.d.ts +3 -0
- package/lib/browser/i18n/zh/chat.js +216 -0
- package/lib/browser/i18n/zh/common.d.ts +3 -0
- package/lib/browser/i18n/zh/common.js +102 -0
- package/lib/browser/i18n/zh/console.d.ts +3 -0
- package/lib/browser/i18n/zh/console.js +233 -0
- package/lib/browser/i18n/zh/discover.d.ts +3 -0
- package/lib/browser/i18n/zh/discover.js +120 -0
- package/lib/browser/i18n/zh/service.d.ts +3 -0
- package/lib/browser/i18n/zh/service.js +245 -0
- package/lib/browser/i18n/zh/settings.d.ts +3 -0
- package/lib/browser/i18n/zh/settings.js +216 -0
- package/lib/browser/i18n/zh/tools.d.ts +3 -0
- package/lib/browser/i18n/zh/tools.js +89 -0
- package/lib/browser/i18n/zh-tw/account.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/account.js +205 -0
- package/lib/browser/i18n/zh-tw/assistant.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/assistant.js +132 -0
- package/lib/browser/i18n/zh-tw/call.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/call.js +89 -0
- package/lib/browser/i18n/zh-tw/chat.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/chat.js +216 -0
- package/lib/browser/i18n/zh-tw/common.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/common.js +102 -0
- package/lib/browser/i18n/zh-tw/console.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/console.js +233 -0
- package/lib/browser/i18n/zh-tw/discover.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/discover.js +120 -0
- package/lib/browser/i18n/zh-tw/service.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/service.js +245 -0
- package/lib/browser/i18n/zh-tw/settings.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/settings.js +216 -0
- package/lib/browser/i18n/zh-tw/tools.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/tools.js +88 -0
- package/lib/browser/markdown/code-renderers.d.ts +2 -0
- package/lib/browser/markdown/code-renderers.js +3 -1
- package/lib/browser/offline/device-values.d.ts +4 -0
- package/lib/browser/offline/device-values.js +10 -0
- package/lib/browser/pwa/page-build.d.ts +16 -0
- package/lib/browser/pwa/page-build.js +48 -0
- package/lib/browser/screen/page-answers.d.ts +2 -1
- package/lib/browser/screen/page-answers.js +7 -4
- package/lib/browser/settings/settings-protocol.d.ts +4 -0
- package/lib/browser/settings/settings-protocol.js +4 -0
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +3 -0
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +1 -1
- package/lib/browser/style/conversation-column.d.ts +1 -1
- package/lib/browser/style/conversation-column.js +17 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +11 -1
- package/lib/browser/style/device.js +1 -0
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +1 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +135 -57
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +0 -7
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +8 -0
- package/lib/browser/style/video-call.d.ts +3 -0
- package/lib/browser/style/video-call.js +66 -0
- package/lib/browser/style.js +2 -0
- package/lib/browser/util/call-transcript.d.ts +17 -0
- package/lib/browser/util/call-transcript.js +113 -0
- package/lib/browser/util/desktop.d.ts +10 -1
- package/lib/browser/util/desktop.js +10 -0
- package/lib/browser/util/image-pull.d.ts +62 -0
- package/lib/browser/util/image-pull.js +91 -0
- package/lib/browser/util/process.d.ts +6 -0
- package/lib/browser/util/process.js +17 -4
- package/lib/browser/util/spoken.d.ts +3 -3
- package/lib/browser/util/spoken.js +4 -4
- package/lib/browser/video-call/call-camera.d.ts +60 -0
- package/lib/browser/video-call/call-camera.js +192 -0
- package/lib/browser/video-call/call-people.d.ts +22 -0
- package/lib/browser/video-call/call-people.js +32 -0
- package/lib/browser/video-call/call-window.d.ts +20 -0
- package/lib/browser/video-call/call-window.js +83 -0
- package/lib/browser/video-call/clip-plan.d.ts +57 -0
- package/lib/browser/video-call/clip-plan.js +80 -0
- package/lib/browser/video-call/face-camera.d.ts +94 -0
- package/lib/browser/video-call/face-camera.js +197 -0
- package/lib/browser/video-call/face-files.d.ts +70 -0
- package/lib/browser/video-call/face-files.js +137 -0
- package/lib/browser/video-call/face-moves.d.ts +69 -0
- package/lib/browser/video-call/face-moves.js +184 -0
- package/lib/browser/video-call/face-stage.d.ts +140 -0
- package/lib/browser/video-call/face-stage.js +223 -0
- package/lib/browser/video-call/mouth-layer.d.ts +82 -0
- package/lib/browser/video-call/mouth-layer.js +245 -0
- package/lib/browser/video-call/video-call-view.d.ts +20 -0
- package/lib/browser/video-call/video-call-view.js +290 -0
- package/lib/browser/video-call/video-face.d.ts +20 -0
- package/lib/browser/video-call/video-face.js +507 -0
- package/lib/browser/workbench-hosts.d.ts +1 -0
- package/lib/browser/workbench-protocol.d.ts +2 -0
- package/lib/browser/workbench-util.d.ts +5 -0
- package/lib/browser/workbench-util.js +18 -0
- package/lib/browser/workbench.d.ts +14 -0
- package/lib/browser/workbench.js +71 -4
- package/package.json +7 -7
- package/public/faces/README.md +40 -0
- package/public/faces/blonde/clap.mp4 +0 -0
- package/public/faces/blonde/dance.mp4 +0 -0
- package/public/faces/blonde/face.jpg +0 -0
- package/public/faces/blonde/happy.mp4 +0 -0
- package/public/faces/blonde/heart.mp4 +0 -0
- package/public/faces/blonde/idle-1.mp4 +0 -0
- package/public/faces/blonde/idle-2.mp4 +0 -0
- package/public/faces/blonde/idle-3.mp4 +0 -0
- package/public/faces/blonde/laugh.mp4 +0 -0
- package/public/faces/blonde/listening.mp4 +0 -0
- package/public/faces/blonde/poster.jpg +0 -0
- package/public/faces/blonde/shy.mp4 +0 -0
- package/public/faces/blonde/sorry.mp4 +0 -0
- package/public/faces/blonde/stretch.mp4 +0 -0
- package/public/faces/blonde/surprised.mp4 +0 -0
- package/public/faces/blonde/talk-1.mp4 +0 -0
- package/public/faces/blonde/talk-2.mp4 +0 -0
- package/public/faces/blonde/think-2.mp4 +0 -0
- package/public/faces/blonde/thinking.mp4 +0 -0
- package/public/faces/blonde/wave.mp4 +0 -0
- package/public/faces/clap.mp4 +0 -0
- package/public/faces/dance.mp4 +0 -0
- package/public/faces/face.jpg +0 -0
- package/public/faces/framing.json +1 -0
- package/public/faces/happy.mp4 +0 -0
- package/public/faces/heart.mp4 +0 -0
- package/public/faces/idle-1.mp4 +0 -0
- package/public/faces/idle-2.mp4 +0 -0
- package/public/faces/idle-3.mp4 +0 -0
- package/public/faces/laugh.mp4 +0 -0
- package/public/faces/lips.json +1 -0
- package/public/faces/listening.mp4 +0 -0
- package/public/faces/poster.jpg +0 -0
- package/public/faces/shy.mp4 +0 -0
- package/public/faces/sorry.mp4 +0 -0
- package/public/faces/stretch.mp4 +0 -0
- package/public/faces/surprised.mp4 +0 -0
- package/public/faces/talk-1.mp4 +0 -0
- package/public/faces/talk-2.mp4 +0 -0
- package/public/faces/think-2.mp4 +0 -0
- package/public/faces/thinking.mp4 +0 -0
- package/public/faces/wave.mp4 +0 -0
|
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VoiceCall = void 0;
|
|
4
4
|
const turn_end_1 = require("../util/turn-end");
|
|
5
5
|
const voice_1 = require("../util/voice");
|
|
6
|
+
const call_conversing_1 = require("./call-conversing");
|
|
7
|
+
const call_partnering_1 = require("./call-partnering");
|
|
6
8
|
const call_turn_end_1 = require("./call-turn-end");
|
|
9
|
+
const voice_reading_1 = require("./voice-reading");
|
|
7
10
|
const voice_reopen_1 = require("./voice-reopen");
|
|
8
11
|
const IDLE = { active: false, phase: 'listening', heard: '' };
|
|
9
12
|
/**
|
|
@@ -27,9 +30,36 @@ class VoiceCall {
|
|
|
27
30
|
this.calls = 0;
|
|
28
31
|
/** Its voice service is opening: an answer that comes meanwhile waits for it (`waiting`, '' for none). */
|
|
29
32
|
this.opening = false;
|
|
33
|
+
/** The answer begun on what the user said so far (CallPartner.draft). */
|
|
34
|
+
this.drafts = new call_conversing_1.CallDrafts();
|
|
30
35
|
/** What waits to be said that the user did not ask for (a dialog, a task that ended), in order. */
|
|
31
36
|
this.announcements = [];
|
|
37
|
+
/** For the face of the call (CallSounds): Ta's voice, whichever the call has (it opens after the call shows). */
|
|
38
|
+
this.sounds = new voice_reading_1.CallSounds(() => this.voice);
|
|
39
|
+
this.level = this.sounds.level;
|
|
32
40
|
this.voice = device;
|
|
41
|
+
const call = this;
|
|
42
|
+
this.partners = new call_partnering_1.CallPartnering({
|
|
43
|
+
get calls() {
|
|
44
|
+
return call.calls;
|
|
45
|
+
},
|
|
46
|
+
get state() {
|
|
47
|
+
return call.state;
|
|
48
|
+
},
|
|
49
|
+
set: change => this.set(change),
|
|
50
|
+
turnEnded: reply => this.turnEnded(reply),
|
|
51
|
+
unsent: () => this.unsent(),
|
|
52
|
+
announce: text => this.announce(text),
|
|
53
|
+
}, options);
|
|
54
|
+
this.conversing = new call_conversing_1.CallConversing({
|
|
55
|
+
get state() {
|
|
56
|
+
return call.state;
|
|
57
|
+
},
|
|
58
|
+
set: change => this.set(change),
|
|
59
|
+
hangUp: () => this.hangUp(),
|
|
60
|
+
end: reason => this.end(reason),
|
|
61
|
+
lost: () => this.revoice(),
|
|
62
|
+
}, options.silentMs);
|
|
33
63
|
this.turnEnd = new call_turn_end_1.CallTurnEnd(options, () => this.quiet(), text => this.suspect(text));
|
|
34
64
|
}
|
|
35
65
|
subscribe(listener) {
|
|
@@ -39,19 +69,21 @@ class VoiceCall {
|
|
|
39
69
|
/**
|
|
40
70
|
* Begins the call: Ta listens. With what the user said as they called (let go over 通话 of a talk), already being
|
|
41
71
|
* sent by the box, Ta waits for its turn and reads the answer instead; should the sending fail, it listens.
|
|
42
|
-
* `direct`: the conversation's voice kept on (let go over 持续说),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (this.state.active) {
|
|
72
|
+
* `direct`: the conversation's voice kept on (let go over 持续说), no partner; `video`: a video call (CallState.video). */
|
|
73
|
+
start(said, { direct = false, video = false } = {}) {
|
|
74
|
+
if (this.state.active)
|
|
46
75
|
return;
|
|
47
|
-
}
|
|
48
76
|
this.device.hush();
|
|
49
77
|
this.silent = 0;
|
|
50
78
|
this.spoke = Date.now();
|
|
51
79
|
const call = ++this.calls;
|
|
52
80
|
const opening = this.open(direct);
|
|
53
81
|
// Said as they called: the turn is at work already, its answer is read once the voice is there.
|
|
54
|
-
this.set(
|
|
82
|
+
this.set({
|
|
83
|
+
...(said ? { active: true, phase: 'thinking', heard: said.text, said: said.text } : { active: true, phase: opening ? 'connecting' : 'listening' }),
|
|
84
|
+
...(video ? { video } : {}),
|
|
85
|
+
since: Date.now(),
|
|
86
|
+
});
|
|
55
87
|
said === null || said === void 0 ? void 0 : said.sent.catch(() => this.state.active && this.state.phase === 'thinking' && this.unsent());
|
|
56
88
|
if (!opening) {
|
|
57
89
|
if (!said) {
|
|
@@ -61,23 +93,19 @@ class VoiceCall {
|
|
|
61
93
|
}
|
|
62
94
|
this.opening = true;
|
|
63
95
|
opening.then(([voice, partner]) => {
|
|
64
|
-
var _a
|
|
96
|
+
var _a;
|
|
65
97
|
if (!this.state.active || call !== this.calls) {
|
|
66
98
|
(_a = voice === null || voice === void 0 ? void 0 : voice.stop) === null || _a === void 0 ? void 0 : _a.call(voice);
|
|
67
99
|
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
68
100
|
return;
|
|
69
101
|
}
|
|
70
102
|
this.opening = false;
|
|
71
|
-
this.partner
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
if (partner) {
|
|
75
|
-
this.set({ partnered: true });
|
|
76
|
-
}
|
|
77
|
-
if (partner && said && this.state.phase === 'thinking') {
|
|
78
|
-
// Said as they called, to the conversation: the partner answers it, not the turn.
|
|
103
|
+
this.partners.adopt(partner);
|
|
104
|
+
// Said as they called, to the conversation: the partner answers it, not the turn; a voice that thinks
|
|
105
|
+
// begins afresh.
|
|
106
|
+
if (partner && said && this.state.phase === 'thinking' && !(voice === null || voice === void 0 ? void 0 : voice.thinks)) {
|
|
79
107
|
this.waiting = undefined;
|
|
80
|
-
this.ask(said.text, true);
|
|
108
|
+
this.partners.ask(said.text, true);
|
|
81
109
|
}
|
|
82
110
|
if (voice) {
|
|
83
111
|
this.takeVoice(voice);
|
|
@@ -89,15 +117,24 @@ class VoiceCall {
|
|
|
89
117
|
}
|
|
90
118
|
});
|
|
91
119
|
}
|
|
92
|
-
/** The voice of a service is the call's now: it hears the user cut in. */
|
|
120
|
+
/** The voice of a service is the call's now: it hears the user cut in, or answers by itself (thinks). */
|
|
93
121
|
takeVoice(voice) {
|
|
94
|
-
var _a;
|
|
95
122
|
this.voice = voice;
|
|
96
|
-
this.offSpeech =
|
|
123
|
+
this.offSpeech = this.sounds.follow(voice);
|
|
124
|
+
if (voice.thinks && voice.converse) {
|
|
125
|
+
const call = this.calls;
|
|
126
|
+
this.waiting = undefined;
|
|
127
|
+
voice.converse(this.conversing.talk(() => call === this.calls && this.state.active));
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
this.partners.unvoice();
|
|
131
|
+
this.offSpeech = this.sounds.heard(voice, () => this.bargeIn());
|
|
97
132
|
this.set({ bargeIn: !!voice.onSpeech && voice.cutsIn !== false });
|
|
98
133
|
}
|
|
99
134
|
/** Its voice is there: the answer that came meanwhile is read, a turn at work is waited for, else Ta listens. */
|
|
100
135
|
voiced() {
|
|
136
|
+
if (this.voice.thinks)
|
|
137
|
+
return;
|
|
101
138
|
const waiting = this.waiting;
|
|
102
139
|
this.waiting = undefined;
|
|
103
140
|
if (waiting !== undefined) {
|
|
@@ -117,23 +154,44 @@ class VoiceCall {
|
|
|
117
154
|
* again as the connection comes back (VoiceReopen); a service no longer chosen gives the voice of the device.
|
|
118
155
|
*/
|
|
119
156
|
revoice() {
|
|
120
|
-
var _a, _b, _c;
|
|
157
|
+
var _a, _b, _c, _d;
|
|
121
158
|
const call = this.calls;
|
|
122
|
-
|
|
159
|
+
// A voice that thought had the brain of the partner: both open again.
|
|
160
|
+
const thought = !!((_a = this.partners.partner) === null || _a === void 0 ? void 0 : _a.brain);
|
|
161
|
+
this.conversing.stop();
|
|
162
|
+
(_b = this.offSpeech) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
123
163
|
this.offSpeech = undefined;
|
|
124
|
-
(
|
|
164
|
+
(_d = (_c = this.voice).stop) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
125
165
|
this.voice = this.device;
|
|
166
|
+
if (thought) {
|
|
167
|
+
this.partners.close();
|
|
168
|
+
}
|
|
126
169
|
this.opening = true;
|
|
127
170
|
this.set({ phase: 'connecting', heard: '', bargeIn: false });
|
|
128
|
-
|
|
129
|
-
this.reopening = new voice_reopen_1.VoiceReopen(() =>
|
|
171
|
+
let partner;
|
|
172
|
+
this.reopening = new voice_reopen_1.VoiceReopen(async () => {
|
|
173
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
174
|
+
var _h;
|
|
175
|
+
if (!thought) {
|
|
176
|
+
return (_b = (_a = this.options).openVoice) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
177
|
+
}
|
|
178
|
+
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
179
|
+
const opening = (_h = (_e = (_d = (_c = this.options).openPartner) === null || _d === void 0 ? void 0 : _d.call(_c)) === null || _e === void 0 ? void 0 : _e.catch(() => undefined)) !== null && _h !== void 0 ? _h : Promise.resolve(undefined);
|
|
180
|
+
const voice = await ((_g = (_f = this.options).openVoice) === null || _g === void 0 ? void 0 : _g.call(_f, opening));
|
|
181
|
+
partner = await opening;
|
|
182
|
+
return voice;
|
|
183
|
+
});
|
|
130
184
|
this.reopening.run().then(voice => {
|
|
131
185
|
var _a;
|
|
132
186
|
if (call !== this.calls || !this.state.active) {
|
|
133
187
|
(_a = voice === null || voice === void 0 ? void 0 : voice.stop) === null || _a === void 0 ? void 0 : _a.call(voice);
|
|
188
|
+
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
134
189
|
return;
|
|
135
190
|
}
|
|
136
191
|
this.opening = false;
|
|
192
|
+
if (thought) {
|
|
193
|
+
this.partners.adopt(partner);
|
|
194
|
+
}
|
|
137
195
|
if (voice) {
|
|
138
196
|
this.takeVoice(voice);
|
|
139
197
|
}
|
|
@@ -141,23 +199,22 @@ class VoiceCall {
|
|
|
141
199
|
}, (error) => call === this.calls && this.state.active && this.end('failed', error instanceof Error ? error.message : String(error)));
|
|
142
200
|
}
|
|
143
201
|
hangUp() {
|
|
144
|
-
var _a, _b, _c, _d
|
|
145
|
-
if (!this.state.active)
|
|
202
|
+
var _a, _b, _c, _d;
|
|
203
|
+
if (!this.state.active)
|
|
146
204
|
return;
|
|
147
|
-
|
|
148
|
-
this.
|
|
149
|
-
|
|
150
|
-
this.partner = undefined;
|
|
205
|
+
this.drafts.drop();
|
|
206
|
+
this.conversing.stop();
|
|
207
|
+
this.partners.close();
|
|
151
208
|
this.calls++;
|
|
152
|
-
(
|
|
209
|
+
(_a = this.reopening) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
153
210
|
this.reopening = undefined;
|
|
154
211
|
this.opening = false;
|
|
155
212
|
this.waiting = undefined;
|
|
156
213
|
this.stopListening();
|
|
157
214
|
this.voice.hush();
|
|
158
|
-
(
|
|
215
|
+
(_b = this.offSpeech) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
159
216
|
this.offSpeech = undefined;
|
|
160
|
-
(
|
|
217
|
+
(_d = (_c = this.voice).stop) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
161
218
|
this.voice = this.device;
|
|
162
219
|
this.pending = undefined;
|
|
163
220
|
this.announcements = [];
|
|
@@ -170,9 +227,9 @@ class VoiceCall {
|
|
|
170
227
|
*/
|
|
171
228
|
announce(text) {
|
|
172
229
|
const said = text.trim();
|
|
173
|
-
|
|
230
|
+
// A voice that thinks is told the news of the work by Ta itself (TaVoiceEngine.tell).
|
|
231
|
+
if (!this.state.active || !said || this.voice.thinks)
|
|
174
232
|
return;
|
|
175
|
-
}
|
|
176
233
|
this.announcements.push(said);
|
|
177
234
|
if (!this.state.paused && !this.opening && this.state.phase === 'listening' && !this.state.heard.trim()) {
|
|
178
235
|
this.listen();
|
|
@@ -189,11 +246,18 @@ class VoiceCall {
|
|
|
189
246
|
* and waits, rather than look as if it listened. What was being said is said again on resume.
|
|
190
247
|
*/
|
|
191
248
|
pause() {
|
|
249
|
+
var _a, _b;
|
|
192
250
|
if (!this.state.active || this.state.paused) {
|
|
193
251
|
return;
|
|
194
252
|
}
|
|
253
|
+
if (this.voice.thinks) {
|
|
254
|
+
(_b = (_a = this.voice).mute) === null || _b === void 0 ? void 0 : _b.call(_a, true);
|
|
255
|
+
this.voice.hush();
|
|
256
|
+
this.set({ paused: true, phase: 'listening', heard: '' });
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
195
259
|
this.stopListening();
|
|
196
|
-
this.
|
|
260
|
+
this.drafts.drop();
|
|
197
261
|
if (this.state.phase === 'speaking') {
|
|
198
262
|
this.voice.hush();
|
|
199
263
|
this.pending = this.speaking;
|
|
@@ -202,11 +266,17 @@ class VoiceCall {
|
|
|
202
266
|
}
|
|
203
267
|
/** The page shows again: the answer that waits is read, a turn at work is waited for, else Ta listens. */
|
|
204
268
|
resume() {
|
|
269
|
+
var _a, _b;
|
|
205
270
|
if (!this.state.active || !this.state.paused) {
|
|
206
271
|
return;
|
|
207
272
|
}
|
|
208
273
|
this.silent = 0;
|
|
209
274
|
this.set({ paused: false });
|
|
275
|
+
if (this.voice.thinks) {
|
|
276
|
+
this.conversing.resumed();
|
|
277
|
+
(_b = (_a = this.voice).mute) === null || _b === void 0 ? void 0 : _b.call(_a, false);
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
210
280
|
const pending = this.pending;
|
|
211
281
|
this.pending = undefined;
|
|
212
282
|
if (pending) {
|
|
@@ -220,7 +290,12 @@ class VoiceCall {
|
|
|
220
290
|
interrupt() {
|
|
221
291
|
if (this.state.active && this.state.phase === 'speaking') {
|
|
222
292
|
this.voice.hush();
|
|
223
|
-
this.
|
|
293
|
+
if (this.voice.thinks) {
|
|
294
|
+
this.set({ phase: 'listening', heard: '' });
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
this.listen(false);
|
|
298
|
+
}
|
|
224
299
|
}
|
|
225
300
|
}
|
|
226
301
|
/**
|
|
@@ -230,7 +305,7 @@ class VoiceCall {
|
|
|
230
305
|
turn(working, reply) {
|
|
231
306
|
var _a;
|
|
232
307
|
// A partner answers in this call: the turns of the conversation are its work, not the call's.
|
|
233
|
-
if (!this.state.active || this.state.phase !== 'thinking' || this.partner) {
|
|
308
|
+
if (!this.state.active || this.state.phase !== 'thinking' || this.partners.partner) {
|
|
234
309
|
this.asked = undefined;
|
|
235
310
|
return;
|
|
236
311
|
}
|
|
@@ -272,7 +347,7 @@ class VoiceCall {
|
|
|
272
347
|
/** What was said is over: Ta listens again, or hangs up when the partner ended the call. */
|
|
273
348
|
over() {
|
|
274
349
|
var _a, _b;
|
|
275
|
-
if ((_b = (_a = this.partner) === null || _a === void 0 ? void 0 : _a.ending) === null || _b === void 0 ? void 0 : _b.call(_a)) {
|
|
350
|
+
if ((_b = (_a = this.partners.partner) === null || _a === void 0 ? void 0 : _a.ending) === null || _b === void 0 ? void 0 : _b.call(_a)) {
|
|
276
351
|
this.hangUp();
|
|
277
352
|
}
|
|
278
353
|
else {
|
|
@@ -295,8 +370,12 @@ class VoiceCall {
|
|
|
295
370
|
* alone a listen ended on, which what is heard now follows, gone or sent once it waited FILLER_MS for words.
|
|
296
371
|
*/
|
|
297
372
|
listen(announce = true, held) {
|
|
373
|
+
if (this.voice.thinks) {
|
|
374
|
+
// It listens by itself.
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
298
377
|
this.stopListening();
|
|
299
|
-
this.
|
|
378
|
+
this.drafts.drop();
|
|
300
379
|
if (this.state.paused) {
|
|
301
380
|
return;
|
|
302
381
|
}
|
|
@@ -317,9 +396,7 @@ class VoiceCall {
|
|
|
317
396
|
this.set(text.trim() ? { heard: text, said: undefined, reading: undefined } : { heard: text });
|
|
318
397
|
if (more && text.trim()) {
|
|
319
398
|
// They say more than the answer begun was to: it goes.
|
|
320
|
-
|
|
321
|
-
this.dropDraft();
|
|
322
|
-
}
|
|
399
|
+
this.drafts.heard(text);
|
|
323
400
|
this.turnEnd.heard(text);
|
|
324
401
|
}
|
|
325
402
|
}
|
|
@@ -347,6 +424,9 @@ class VoiceCall {
|
|
|
347
424
|
}
|
|
348
425
|
/** The user says they are done (the mark of the bar tapped): what was heard goes now as it is, sounds alone too. */
|
|
349
426
|
endTurn() {
|
|
427
|
+
if (this.voice.thinks) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
350
430
|
const said = this.listened();
|
|
351
431
|
if (said) {
|
|
352
432
|
this.stopListening();
|
|
@@ -409,15 +489,14 @@ class VoiceCall {
|
|
|
409
489
|
this.silent = 0;
|
|
410
490
|
this.spoke = Date.now();
|
|
411
491
|
this.set({ phase: 'thinking', heard: said, said, reading: undefined });
|
|
412
|
-
const
|
|
413
|
-
this.
|
|
414
|
-
|
|
415
|
-
this.kept(drafted.draft, said);
|
|
492
|
+
const draft = this.drafts.take(said);
|
|
493
|
+
if (this.partners.partner && draft) {
|
|
494
|
+
this.partners.kept(draft, said);
|
|
416
495
|
return;
|
|
417
496
|
}
|
|
418
|
-
|
|
419
|
-
if (this.partner) {
|
|
420
|
-
this.ask(said);
|
|
497
|
+
draft === null || draft === void 0 ? void 0 : draft.drop();
|
|
498
|
+
if (this.partners.partner) {
|
|
499
|
+
this.partners.ask(said);
|
|
421
500
|
}
|
|
422
501
|
else {
|
|
423
502
|
this.options.send(said).catch(() => this.state.active && this.unsent());
|
|
@@ -428,79 +507,18 @@ class VoiceCall {
|
|
|
428
507
|
* should they be done with these words (take), dropped as they say more (docs/design/ta-call.md 10).
|
|
429
508
|
*/
|
|
430
509
|
suspect(text) {
|
|
431
|
-
var _a;
|
|
432
510
|
const said = text.trim();
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
return;
|
|
511
|
+
if (this.listened() === said) {
|
|
512
|
+
this.drafts.begin(this.partners.partner, said);
|
|
436
513
|
}
|
|
437
|
-
this.dropDraft();
|
|
438
|
-
const draft = partner.draft(said);
|
|
439
|
-
draft.reply.catch(() => {
|
|
440
|
-
this.draftless = partner;
|
|
441
|
-
});
|
|
442
|
-
this.drafted = { text: said, draft };
|
|
443
|
-
}
|
|
444
|
-
/** The user was done with the words of the draft: its answer is the reply; failing, the partner is asked as usual. */
|
|
445
|
-
kept(draft, said) {
|
|
446
|
-
const call = this.calls;
|
|
447
|
-
const partner = this.partner;
|
|
448
|
-
draft.keep();
|
|
449
|
-
draft.reply.then(reply => call === this.calls && this.turnEnded(reply), () => call === this.calls && this.state.active && this.partner === partner && this.ask(said));
|
|
450
|
-
}
|
|
451
|
-
dropDraft() {
|
|
452
|
-
const drafted = this.drafted;
|
|
453
|
-
this.drafted = undefined;
|
|
454
|
-
drafted === null || drafted === void 0 ? void 0 : drafted.draft.drop();
|
|
455
514
|
}
|
|
456
515
|
/** The voice and the partner the call opens as it starts; undefined when it opens neither. A partner that fails is none. */
|
|
457
516
|
open(direct) {
|
|
458
517
|
var _a, _b, _c, _d, _e;
|
|
459
|
-
const
|
|
460
|
-
const
|
|
518
|
+
const partner = direct ? undefined : (_c = (_b = (_a = this.options).openPartner) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.catch(() => undefined);
|
|
519
|
+
const voice = (_e = (_d = this.options).openVoice) === null || _e === void 0 ? void 0 : _e.call(_d, partner);
|
|
461
520
|
return voice || partner ? Promise.all([voice, partner]) : undefined;
|
|
462
521
|
}
|
|
463
|
-
/** The partner answers what the user said; its reply is read as a turn's is. */
|
|
464
|
-
ask(text, sent) {
|
|
465
|
-
const call = this.calls;
|
|
466
|
-
const partner = this.partner;
|
|
467
|
-
partner === null || partner === void 0 ? void 0 : partner.say(text, sent ? { sent } : undefined).then(reply => call === this.calls && this.turnEnded(reply), () => call === this.calls && this.state.active && this.reopen(partner, text, sent));
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* The partner did not answer (the Ta service restarted, its side of the call is gone): it opens again once and
|
|
471
|
-
* answers what was said; failing that, the conversation answers from then on. The call goes on either way.
|
|
472
|
-
*/
|
|
473
|
-
reopen(failed, text, sent) {
|
|
474
|
-
var _a, _b, _c;
|
|
475
|
-
var _d;
|
|
476
|
-
const call = this.calls;
|
|
477
|
-
if (this.partner !== failed) {
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
failed.close();
|
|
481
|
-
this.partner = undefined;
|
|
482
|
-
const again = (_d = (_c = (_b = (_a = this.options).openPartner) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.catch(() => undefined)) !== null && _d !== void 0 ? _d : Promise.resolve(undefined);
|
|
483
|
-
void again.then(partner => {
|
|
484
|
-
var _a;
|
|
485
|
-
if (call !== this.calls || !this.state.active) {
|
|
486
|
-
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
if (!partner) {
|
|
490
|
-
this.set({ partnered: false });
|
|
491
|
-
if (sent) {
|
|
492
|
-
this.unsent();
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
this.options.send(text).catch(() => this.state.active && this.unsent());
|
|
496
|
-
}
|
|
497
|
-
return;
|
|
498
|
-
}
|
|
499
|
-
this.partner = partner;
|
|
500
|
-
(_a = partner.news) === null || _a === void 0 ? void 0 : _a.call(partner, news => call === this.calls && this.announce(news));
|
|
501
|
-
partner.say(text, sent ? { sent } : undefined).then(reply => call === this.calls && this.turnEnded(reply), () => call === this.calls && this.state.active && this.unsent());
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
522
|
/** What the user said did not go: not in the captions as if it had, and Ta listens again. */
|
|
505
523
|
unsent() {
|
|
506
524
|
this.set({ said: undefined });
|
|
@@ -521,9 +539,8 @@ class VoiceCall {
|
|
|
521
539
|
}
|
|
522
540
|
set(change) {
|
|
523
541
|
this.state = { ...this.state, ...change };
|
|
524
|
-
for (const listener of this.listeners)
|
|
542
|
+
for (const listener of this.listeners)
|
|
525
543
|
listener();
|
|
526
|
-
}
|
|
527
544
|
}
|
|
528
545
|
}
|
|
529
546
|
exports.VoiceCall = VoiceCall;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { SpokenTimeline } from './spoken-timeline';
|
|
2
|
+
import type { CallReading } from './voice-call-protocol';
|
|
3
|
+
/**
|
|
4
|
+
* What a voice service reads now, on the clock of its sound as it plays (CallReading): it begins where its first sound
|
|
5
|
+
* plays, held as long as the face of a video call asks (RealtimeVoice.hold), and its captions show each sentence as it
|
|
6
|
+
* is heard, by the same timeline the face asks.
|
|
7
|
+
*/
|
|
8
|
+
export declare class VoiceReading implements CallReading {
|
|
9
|
+
readonly say: number;
|
|
10
|
+
pieces: readonly string[];
|
|
11
|
+
protected readonly context: AudioContext;
|
|
12
|
+
protected readonly holdS: number;
|
|
13
|
+
/** Whether it is still what plays: once not, its captions stop. */
|
|
14
|
+
protected readonly live: () => boolean;
|
|
15
|
+
protected readonly onPiece?: ((pieces: string[], index: number) => void) | undefined;
|
|
16
|
+
/** When its first sound plays, on the clock of the audio context. */
|
|
17
|
+
startAt?: number;
|
|
18
|
+
timeline: SpokenTimeline;
|
|
19
|
+
/** Its sound as it was put to play: from `at` on the clock of the audio context, `from` seconds into it, for `seconds`. */
|
|
20
|
+
protected readonly played: {
|
|
21
|
+
at: number;
|
|
22
|
+
from: number;
|
|
23
|
+
seconds: number;
|
|
24
|
+
}[];
|
|
25
|
+
protected shown: number;
|
|
26
|
+
/** The words the captions were last told: told again as more of them came. */
|
|
27
|
+
protected lastPieces?: readonly string[];
|
|
28
|
+
protected timer?: ReturnType<typeof setInterval>;
|
|
29
|
+
constructor(say: number, pieces: readonly string[], context: AudioContext, holdS: number,
|
|
30
|
+
/** Whether it is still what plays: once not, its captions stop. */
|
|
31
|
+
live: () => boolean, onPiece?: ((pieces: string[], index: number) => void) | undefined);
|
|
32
|
+
/**
|
|
33
|
+
* How far into its sound it plays: where the sound playing now is in it, or where the last played ended while what
|
|
34
|
+
* comes next is late (the sound stopped short), so that the words, the clip and the mouth wait with the voice.
|
|
35
|
+
*/
|
|
36
|
+
now(): number;
|
|
37
|
+
pieceAt(seconds: number): number;
|
|
38
|
+
/** More of its sound came: when the first of it plays, and how much of it there is. */
|
|
39
|
+
heard(at: number, seconds: number): void;
|
|
40
|
+
/** Its words, more of them as they came (a voice that thinks says them as it goes): its sentences timed again. */
|
|
41
|
+
words(pieces: readonly string[]): void;
|
|
42
|
+
/** All of its sound came: the timeline knows how long it is. */
|
|
43
|
+
said(): void;
|
|
44
|
+
protected caption(): void;
|
|
45
|
+
}
|
|
46
|
+
/** The sound of what a voice reads, for the face of a video call (CallVoice.onSound), and the hold it asks (hold). */
|
|
47
|
+
export declare class VoiceSoundTap {
|
|
48
|
+
/** How long each reading waits before it plays, in seconds. */
|
|
49
|
+
holdS: number;
|
|
50
|
+
protected readonly listeners: Set<(say: number, pcm: Uint8Array | undefined, rate: number) => void>;
|
|
51
|
+
readonly on: (listener: (say: number, pcm: Uint8Array | undefined, rate: number) => void) => (() => void);
|
|
52
|
+
/** The voice it follows (follow), told the hold too. */
|
|
53
|
+
protected voice?: {
|
|
54
|
+
hold?(ms: number): void;
|
|
55
|
+
};
|
|
56
|
+
readonly hold: (ms: number) => void;
|
|
57
|
+
/** Of a call: the sound of its voice is told here, and the hold asked here goes to it; stops with what it returns. */
|
|
58
|
+
follow(voice: {
|
|
59
|
+
hold?(ms: number): void;
|
|
60
|
+
onSound?: VoiceSoundTap['on'];
|
|
61
|
+
}): () => void;
|
|
62
|
+
tell(say: number, pcm: Uint8Array | undefined, rate?: number): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* What the face of a call reads of its voice, whichever voice the call has now: how loud it plays (RMS, 0 to 1;
|
|
66
|
+
* undefined for the device's, which cannot tell), what it reads on the clock of its sound, and that sound.
|
|
67
|
+
*/
|
|
68
|
+
export declare class CallSounds extends VoiceSoundTap {
|
|
69
|
+
protected readonly voiceNow: () => {
|
|
70
|
+
level?(): number;
|
|
71
|
+
nowReading?(): CallReading | undefined;
|
|
72
|
+
};
|
|
73
|
+
constructor(voiceNow: () => {
|
|
74
|
+
level?(): number;
|
|
75
|
+
nowReading?(): CallReading | undefined;
|
|
76
|
+
});
|
|
77
|
+
readonly level: () => number | undefined;
|
|
78
|
+
readonly nowReading: () => CallReading | undefined;
|
|
79
|
+
/** Hears the user cut in while the voice of the call reads, and its sound (follow): stops both with what it returns. */
|
|
80
|
+
heard(voice: Parameters<VoiceSoundTap['follow']>[0] & {
|
|
81
|
+
onSpeech?(listener: () => void): () => void;
|
|
82
|
+
}, cut: () => void): () => void;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=voice-reading.d.ts.map
|