@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
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { TurnEnd } from '../util/turn-end.js';
|
|
2
2
|
import { Voice } from '../util/voice.js';
|
|
3
|
+
import { CallConversing, CallDrafts } from './call-conversing.js';
|
|
4
|
+
import { CallPartnering } from './call-partnering.js';
|
|
3
5
|
import { CallTurnEnd, RETRY_MS, SILENT_MS, SILENT_ROUNDS } from './call-turn-end.js';
|
|
6
|
+
import { CallSounds } from './voice-reading.js';
|
|
4
7
|
import { VoiceReopen } from './voice-reopen.js';
|
|
5
8
|
const IDLE = { active: false, phase: 'listening', heard: '' };
|
|
6
9
|
/**
|
|
@@ -24,9 +27,36 @@ export class VoiceCall {
|
|
|
24
27
|
this.calls = 0;
|
|
25
28
|
/** Its voice service is opening: an answer that comes meanwhile waits for it (`waiting`, '' for none). */
|
|
26
29
|
this.opening = false;
|
|
30
|
+
/** The answer begun on what the user said so far (CallPartner.draft). */
|
|
31
|
+
this.drafts = new CallDrafts();
|
|
27
32
|
/** What waits to be said that the user did not ask for (a dialog, a task that ended), in order. */
|
|
28
33
|
this.announcements = [];
|
|
34
|
+
/** For the face of the call (CallSounds): Ta's voice, whichever the call has (it opens after the call shows). */
|
|
35
|
+
this.sounds = new CallSounds(() => this.voice);
|
|
36
|
+
this.level = this.sounds.level;
|
|
29
37
|
this.voice = device;
|
|
38
|
+
const call = this;
|
|
39
|
+
this.partners = new CallPartnering({
|
|
40
|
+
get calls() {
|
|
41
|
+
return call.calls;
|
|
42
|
+
},
|
|
43
|
+
get state() {
|
|
44
|
+
return call.state;
|
|
45
|
+
},
|
|
46
|
+
set: change => this.set(change),
|
|
47
|
+
turnEnded: reply => this.turnEnded(reply),
|
|
48
|
+
unsent: () => this.unsent(),
|
|
49
|
+
announce: text => this.announce(text),
|
|
50
|
+
}, options);
|
|
51
|
+
this.conversing = new CallConversing({
|
|
52
|
+
get state() {
|
|
53
|
+
return call.state;
|
|
54
|
+
},
|
|
55
|
+
set: change => this.set(change),
|
|
56
|
+
hangUp: () => this.hangUp(),
|
|
57
|
+
end: reason => this.end(reason),
|
|
58
|
+
lost: () => this.revoice(),
|
|
59
|
+
}, options.silentMs);
|
|
30
60
|
this.turnEnd = new CallTurnEnd(options, () => this.quiet(), text => this.suspect(text));
|
|
31
61
|
}
|
|
32
62
|
subscribe(listener) {
|
|
@@ -36,19 +66,21 @@ export class VoiceCall {
|
|
|
36
66
|
/**
|
|
37
67
|
* Begins the call: Ta listens. With what the user said as they called (let go over 通话 of a talk), already being
|
|
38
68
|
* sent by the box, Ta waits for its turn and reads the answer instead; should the sending fail, it listens.
|
|
39
|
-
* `direct`: the conversation's voice kept on (let go over 持续说),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (this.state.active) {
|
|
69
|
+
* `direct`: the conversation's voice kept on (let go over 持续说), no partner; `video`: a video call (CallState.video). */
|
|
70
|
+
start(said, { direct = false, video = false } = {}) {
|
|
71
|
+
if (this.state.active)
|
|
43
72
|
return;
|
|
44
|
-
}
|
|
45
73
|
this.device.hush();
|
|
46
74
|
this.silent = 0;
|
|
47
75
|
this.spoke = Date.now();
|
|
48
76
|
const call = ++this.calls;
|
|
49
77
|
const opening = this.open(direct);
|
|
50
78
|
// Said as they called: the turn is at work already, its answer is read once the voice is there.
|
|
51
|
-
this.set(
|
|
79
|
+
this.set({
|
|
80
|
+
...(said ? { active: true, phase: 'thinking', heard: said.text, said: said.text } : { active: true, phase: opening ? 'connecting' : 'listening' }),
|
|
81
|
+
...(video ? { video } : {}),
|
|
82
|
+
since: Date.now(),
|
|
83
|
+
});
|
|
52
84
|
said === null || said === void 0 ? void 0 : said.sent.catch(() => this.state.active && this.state.phase === 'thinking' && this.unsent());
|
|
53
85
|
if (!opening) {
|
|
54
86
|
if (!said) {
|
|
@@ -58,23 +90,19 @@ export class VoiceCall {
|
|
|
58
90
|
}
|
|
59
91
|
this.opening = true;
|
|
60
92
|
opening.then(([voice, partner]) => {
|
|
61
|
-
var _a
|
|
93
|
+
var _a;
|
|
62
94
|
if (!this.state.active || call !== this.calls) {
|
|
63
95
|
(_a = voice === null || voice === void 0 ? void 0 : voice.stop) === null || _a === void 0 ? void 0 : _a.call(voice);
|
|
64
96
|
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
65
97
|
return;
|
|
66
98
|
}
|
|
67
99
|
this.opening = false;
|
|
68
|
-
this.partner
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
if (partner) {
|
|
72
|
-
this.set({ partnered: true });
|
|
73
|
-
}
|
|
74
|
-
if (partner && said && this.state.phase === 'thinking') {
|
|
75
|
-
// Said as they called, to the conversation: the partner answers it, not the turn.
|
|
100
|
+
this.partners.adopt(partner);
|
|
101
|
+
// Said as they called, to the conversation: the partner answers it, not the turn; a voice that thinks
|
|
102
|
+
// begins afresh.
|
|
103
|
+
if (partner && said && this.state.phase === 'thinking' && !(voice === null || voice === void 0 ? void 0 : voice.thinks)) {
|
|
76
104
|
this.waiting = undefined;
|
|
77
|
-
this.ask(said.text, true);
|
|
105
|
+
this.partners.ask(said.text, true);
|
|
78
106
|
}
|
|
79
107
|
if (voice) {
|
|
80
108
|
this.takeVoice(voice);
|
|
@@ -86,15 +114,24 @@ export class VoiceCall {
|
|
|
86
114
|
}
|
|
87
115
|
});
|
|
88
116
|
}
|
|
89
|
-
/** The voice of a service is the call's now: it hears the user cut in. */
|
|
117
|
+
/** The voice of a service is the call's now: it hears the user cut in, or answers by itself (thinks). */
|
|
90
118
|
takeVoice(voice) {
|
|
91
|
-
var _a;
|
|
92
119
|
this.voice = voice;
|
|
93
|
-
this.offSpeech =
|
|
120
|
+
this.offSpeech = this.sounds.follow(voice);
|
|
121
|
+
if (voice.thinks && voice.converse) {
|
|
122
|
+
const call = this.calls;
|
|
123
|
+
this.waiting = undefined;
|
|
124
|
+
voice.converse(this.conversing.talk(() => call === this.calls && this.state.active));
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.partners.unvoice();
|
|
128
|
+
this.offSpeech = this.sounds.heard(voice, () => this.bargeIn());
|
|
94
129
|
this.set({ bargeIn: !!voice.onSpeech && voice.cutsIn !== false });
|
|
95
130
|
}
|
|
96
131
|
/** Its voice is there: the answer that came meanwhile is read, a turn at work is waited for, else Ta listens. */
|
|
97
132
|
voiced() {
|
|
133
|
+
if (this.voice.thinks)
|
|
134
|
+
return;
|
|
98
135
|
const waiting = this.waiting;
|
|
99
136
|
this.waiting = undefined;
|
|
100
137
|
if (waiting !== undefined) {
|
|
@@ -114,23 +151,44 @@ export class VoiceCall {
|
|
|
114
151
|
* again as the connection comes back (VoiceReopen); a service no longer chosen gives the voice of the device.
|
|
115
152
|
*/
|
|
116
153
|
revoice() {
|
|
117
|
-
var _a, _b, _c;
|
|
154
|
+
var _a, _b, _c, _d;
|
|
118
155
|
const call = this.calls;
|
|
119
|
-
|
|
156
|
+
// A voice that thought had the brain of the partner: both open again.
|
|
157
|
+
const thought = !!((_a = this.partners.partner) === null || _a === void 0 ? void 0 : _a.brain);
|
|
158
|
+
this.conversing.stop();
|
|
159
|
+
(_b = this.offSpeech) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
120
160
|
this.offSpeech = undefined;
|
|
121
|
-
(
|
|
161
|
+
(_d = (_c = this.voice).stop) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
122
162
|
this.voice = this.device;
|
|
163
|
+
if (thought) {
|
|
164
|
+
this.partners.close();
|
|
165
|
+
}
|
|
123
166
|
this.opening = true;
|
|
124
167
|
this.set({ phase: 'connecting', heard: '', bargeIn: false });
|
|
125
|
-
|
|
126
|
-
this.reopening = new VoiceReopen(() =>
|
|
168
|
+
let partner;
|
|
169
|
+
this.reopening = new VoiceReopen(async () => {
|
|
170
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
171
|
+
var _h;
|
|
172
|
+
if (!thought) {
|
|
173
|
+
return (_b = (_a = this.options).openVoice) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
174
|
+
}
|
|
175
|
+
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
176
|
+
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);
|
|
177
|
+
const voice = await ((_g = (_f = this.options).openVoice) === null || _g === void 0 ? void 0 : _g.call(_f, opening));
|
|
178
|
+
partner = await opening;
|
|
179
|
+
return voice;
|
|
180
|
+
});
|
|
127
181
|
this.reopening.run().then(voice => {
|
|
128
182
|
var _a;
|
|
129
183
|
if (call !== this.calls || !this.state.active) {
|
|
130
184
|
(_a = voice === null || voice === void 0 ? void 0 : voice.stop) === null || _a === void 0 ? void 0 : _a.call(voice);
|
|
185
|
+
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
131
186
|
return;
|
|
132
187
|
}
|
|
133
188
|
this.opening = false;
|
|
189
|
+
if (thought) {
|
|
190
|
+
this.partners.adopt(partner);
|
|
191
|
+
}
|
|
134
192
|
if (voice) {
|
|
135
193
|
this.takeVoice(voice);
|
|
136
194
|
}
|
|
@@ -138,23 +196,22 @@ export class VoiceCall {
|
|
|
138
196
|
}, (error) => call === this.calls && this.state.active && this.end('failed', error instanceof Error ? error.message : String(error)));
|
|
139
197
|
}
|
|
140
198
|
hangUp() {
|
|
141
|
-
var _a, _b, _c, _d
|
|
142
|
-
if (!this.state.active)
|
|
199
|
+
var _a, _b, _c, _d;
|
|
200
|
+
if (!this.state.active)
|
|
143
201
|
return;
|
|
144
|
-
|
|
145
|
-
this.
|
|
146
|
-
|
|
147
|
-
this.partner = undefined;
|
|
202
|
+
this.drafts.drop();
|
|
203
|
+
this.conversing.stop();
|
|
204
|
+
this.partners.close();
|
|
148
205
|
this.calls++;
|
|
149
|
-
(
|
|
206
|
+
(_a = this.reopening) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
150
207
|
this.reopening = undefined;
|
|
151
208
|
this.opening = false;
|
|
152
209
|
this.waiting = undefined;
|
|
153
210
|
this.stopListening();
|
|
154
211
|
this.voice.hush();
|
|
155
|
-
(
|
|
212
|
+
(_b = this.offSpeech) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
156
213
|
this.offSpeech = undefined;
|
|
157
|
-
(
|
|
214
|
+
(_d = (_c = this.voice).stop) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
158
215
|
this.voice = this.device;
|
|
159
216
|
this.pending = undefined;
|
|
160
217
|
this.announcements = [];
|
|
@@ -167,9 +224,9 @@ export class VoiceCall {
|
|
|
167
224
|
*/
|
|
168
225
|
announce(text) {
|
|
169
226
|
const said = text.trim();
|
|
170
|
-
|
|
227
|
+
// A voice that thinks is told the news of the work by Ta itself (TaVoiceEngine.tell).
|
|
228
|
+
if (!this.state.active || !said || this.voice.thinks)
|
|
171
229
|
return;
|
|
172
|
-
}
|
|
173
230
|
this.announcements.push(said);
|
|
174
231
|
if (!this.state.paused && !this.opening && this.state.phase === 'listening' && !this.state.heard.trim()) {
|
|
175
232
|
this.listen();
|
|
@@ -186,11 +243,18 @@ export class VoiceCall {
|
|
|
186
243
|
* and waits, rather than look as if it listened. What was being said is said again on resume.
|
|
187
244
|
*/
|
|
188
245
|
pause() {
|
|
246
|
+
var _a, _b;
|
|
189
247
|
if (!this.state.active || this.state.paused) {
|
|
190
248
|
return;
|
|
191
249
|
}
|
|
250
|
+
if (this.voice.thinks) {
|
|
251
|
+
(_b = (_a = this.voice).mute) === null || _b === void 0 ? void 0 : _b.call(_a, true);
|
|
252
|
+
this.voice.hush();
|
|
253
|
+
this.set({ paused: true, phase: 'listening', heard: '' });
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
192
256
|
this.stopListening();
|
|
193
|
-
this.
|
|
257
|
+
this.drafts.drop();
|
|
194
258
|
if (this.state.phase === 'speaking') {
|
|
195
259
|
this.voice.hush();
|
|
196
260
|
this.pending = this.speaking;
|
|
@@ -199,11 +263,17 @@ export class VoiceCall {
|
|
|
199
263
|
}
|
|
200
264
|
/** The page shows again: the answer that waits is read, a turn at work is waited for, else Ta listens. */
|
|
201
265
|
resume() {
|
|
266
|
+
var _a, _b;
|
|
202
267
|
if (!this.state.active || !this.state.paused) {
|
|
203
268
|
return;
|
|
204
269
|
}
|
|
205
270
|
this.silent = 0;
|
|
206
271
|
this.set({ paused: false });
|
|
272
|
+
if (this.voice.thinks) {
|
|
273
|
+
this.conversing.resumed();
|
|
274
|
+
(_b = (_a = this.voice).mute) === null || _b === void 0 ? void 0 : _b.call(_a, false);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
207
277
|
const pending = this.pending;
|
|
208
278
|
this.pending = undefined;
|
|
209
279
|
if (pending) {
|
|
@@ -217,7 +287,12 @@ export class VoiceCall {
|
|
|
217
287
|
interrupt() {
|
|
218
288
|
if (this.state.active && this.state.phase === 'speaking') {
|
|
219
289
|
this.voice.hush();
|
|
220
|
-
this.
|
|
290
|
+
if (this.voice.thinks) {
|
|
291
|
+
this.set({ phase: 'listening', heard: '' });
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
this.listen(false);
|
|
295
|
+
}
|
|
221
296
|
}
|
|
222
297
|
}
|
|
223
298
|
/**
|
|
@@ -227,7 +302,7 @@ export class VoiceCall {
|
|
|
227
302
|
turn(working, reply) {
|
|
228
303
|
var _a;
|
|
229
304
|
// A partner answers in this call: the turns of the conversation are its work, not the call's.
|
|
230
|
-
if (!this.state.active || this.state.phase !== 'thinking' || this.partner) {
|
|
305
|
+
if (!this.state.active || this.state.phase !== 'thinking' || this.partners.partner) {
|
|
231
306
|
this.asked = undefined;
|
|
232
307
|
return;
|
|
233
308
|
}
|
|
@@ -269,7 +344,7 @@ export class VoiceCall {
|
|
|
269
344
|
/** What was said is over: Ta listens again, or hangs up when the partner ended the call. */
|
|
270
345
|
over() {
|
|
271
346
|
var _a, _b;
|
|
272
|
-
if ((_b = (_a = this.partner) === null || _a === void 0 ? void 0 : _a.ending) === null || _b === void 0 ? void 0 : _b.call(_a)) {
|
|
347
|
+
if ((_b = (_a = this.partners.partner) === null || _a === void 0 ? void 0 : _a.ending) === null || _b === void 0 ? void 0 : _b.call(_a)) {
|
|
273
348
|
this.hangUp();
|
|
274
349
|
}
|
|
275
350
|
else {
|
|
@@ -292,8 +367,12 @@ export class VoiceCall {
|
|
|
292
367
|
* alone a listen ended on, which what is heard now follows, gone or sent once it waited FILLER_MS for words.
|
|
293
368
|
*/
|
|
294
369
|
listen(announce = true, held) {
|
|
370
|
+
if (this.voice.thinks) {
|
|
371
|
+
// It listens by itself.
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
295
374
|
this.stopListening();
|
|
296
|
-
this.
|
|
375
|
+
this.drafts.drop();
|
|
297
376
|
if (this.state.paused) {
|
|
298
377
|
return;
|
|
299
378
|
}
|
|
@@ -314,9 +393,7 @@ export class VoiceCall {
|
|
|
314
393
|
this.set(text.trim() ? { heard: text, said: undefined, reading: undefined } : { heard: text });
|
|
315
394
|
if (more && text.trim()) {
|
|
316
395
|
// They say more than the answer begun was to: it goes.
|
|
317
|
-
|
|
318
|
-
this.dropDraft();
|
|
319
|
-
}
|
|
396
|
+
this.drafts.heard(text);
|
|
320
397
|
this.turnEnd.heard(text);
|
|
321
398
|
}
|
|
322
399
|
}
|
|
@@ -344,6 +421,9 @@ export class VoiceCall {
|
|
|
344
421
|
}
|
|
345
422
|
/** The user says they are done (the mark of the bar tapped): what was heard goes now as it is, sounds alone too. */
|
|
346
423
|
endTurn() {
|
|
424
|
+
if (this.voice.thinks) {
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
347
427
|
const said = this.listened();
|
|
348
428
|
if (said) {
|
|
349
429
|
this.stopListening();
|
|
@@ -406,15 +486,14 @@ export class VoiceCall {
|
|
|
406
486
|
this.silent = 0;
|
|
407
487
|
this.spoke = Date.now();
|
|
408
488
|
this.set({ phase: 'thinking', heard: said, said, reading: undefined });
|
|
409
|
-
const
|
|
410
|
-
this.
|
|
411
|
-
|
|
412
|
-
this.kept(drafted.draft, said);
|
|
489
|
+
const draft = this.drafts.take(said);
|
|
490
|
+
if (this.partners.partner && draft) {
|
|
491
|
+
this.partners.kept(draft, said);
|
|
413
492
|
return;
|
|
414
493
|
}
|
|
415
|
-
|
|
416
|
-
if (this.partner) {
|
|
417
|
-
this.ask(said);
|
|
494
|
+
draft === null || draft === void 0 ? void 0 : draft.drop();
|
|
495
|
+
if (this.partners.partner) {
|
|
496
|
+
this.partners.ask(said);
|
|
418
497
|
}
|
|
419
498
|
else {
|
|
420
499
|
this.options.send(said).catch(() => this.state.active && this.unsent());
|
|
@@ -425,79 +504,18 @@ export class VoiceCall {
|
|
|
425
504
|
* should they be done with these words (take), dropped as they say more (docs/design/ta-call.md 10).
|
|
426
505
|
*/
|
|
427
506
|
suspect(text) {
|
|
428
|
-
var _a;
|
|
429
507
|
const said = text.trim();
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
return;
|
|
508
|
+
if (this.listened() === said) {
|
|
509
|
+
this.drafts.begin(this.partners.partner, said);
|
|
433
510
|
}
|
|
434
|
-
this.dropDraft();
|
|
435
|
-
const draft = partner.draft(said);
|
|
436
|
-
draft.reply.catch(() => {
|
|
437
|
-
this.draftless = partner;
|
|
438
|
-
});
|
|
439
|
-
this.drafted = { text: said, draft };
|
|
440
|
-
}
|
|
441
|
-
/** The user was done with the words of the draft: its answer is the reply; failing, the partner is asked as usual. */
|
|
442
|
-
kept(draft, said) {
|
|
443
|
-
const call = this.calls;
|
|
444
|
-
const partner = this.partner;
|
|
445
|
-
draft.keep();
|
|
446
|
-
draft.reply.then(reply => call === this.calls && this.turnEnded(reply), () => call === this.calls && this.state.active && this.partner === partner && this.ask(said));
|
|
447
|
-
}
|
|
448
|
-
dropDraft() {
|
|
449
|
-
const drafted = this.drafted;
|
|
450
|
-
this.drafted = undefined;
|
|
451
|
-
drafted === null || drafted === void 0 ? void 0 : drafted.draft.drop();
|
|
452
511
|
}
|
|
453
512
|
/** The voice and the partner the call opens as it starts; undefined when it opens neither. A partner that fails is none. */
|
|
454
513
|
open(direct) {
|
|
455
514
|
var _a, _b, _c, _d, _e;
|
|
456
|
-
const
|
|
457
|
-
const
|
|
515
|
+
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);
|
|
516
|
+
const voice = (_e = (_d = this.options).openVoice) === null || _e === void 0 ? void 0 : _e.call(_d, partner);
|
|
458
517
|
return voice || partner ? Promise.all([voice, partner]) : undefined;
|
|
459
518
|
}
|
|
460
|
-
/** The partner answers what the user said; its reply is read as a turn's is. */
|
|
461
|
-
ask(text, sent) {
|
|
462
|
-
const call = this.calls;
|
|
463
|
-
const partner = this.partner;
|
|
464
|
-
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));
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* The partner did not answer (the Ta service restarted, its side of the call is gone): it opens again once and
|
|
468
|
-
* answers what was said; failing that, the conversation answers from then on. The call goes on either way.
|
|
469
|
-
*/
|
|
470
|
-
reopen(failed, text, sent) {
|
|
471
|
-
var _a, _b, _c;
|
|
472
|
-
var _d;
|
|
473
|
-
const call = this.calls;
|
|
474
|
-
if (this.partner !== failed) {
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
failed.close();
|
|
478
|
-
this.partner = undefined;
|
|
479
|
-
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);
|
|
480
|
-
void again.then(partner => {
|
|
481
|
-
var _a;
|
|
482
|
-
if (call !== this.calls || !this.state.active) {
|
|
483
|
-
partner === null || partner === void 0 ? void 0 : partner.close();
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
if (!partner) {
|
|
487
|
-
this.set({ partnered: false });
|
|
488
|
-
if (sent) {
|
|
489
|
-
this.unsent();
|
|
490
|
-
}
|
|
491
|
-
else {
|
|
492
|
-
this.options.send(text).catch(() => this.state.active && this.unsent());
|
|
493
|
-
}
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
this.partner = partner;
|
|
497
|
-
(_a = partner.news) === null || _a === void 0 ? void 0 : _a.call(partner, news => call === this.calls && this.announce(news));
|
|
498
|
-
partner.say(text, sent ? { sent } : undefined).then(reply => call === this.calls && this.turnEnded(reply), () => call === this.calls && this.state.active && this.unsent());
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
519
|
/** What the user said did not go: not in the captions as if it had, and Ta listens again. */
|
|
502
520
|
unsent() {
|
|
503
521
|
this.set({ said: undefined });
|
|
@@ -518,9 +536,8 @@ export class VoiceCall {
|
|
|
518
536
|
}
|
|
519
537
|
set(change) {
|
|
520
538
|
this.state = { ...this.state, ...change };
|
|
521
|
-
for (const listener of this.listeners)
|
|
539
|
+
for (const listener of this.listeners)
|
|
522
540
|
listener();
|
|
523
|
-
}
|
|
524
541
|
}
|
|
525
542
|
}
|
|
526
543
|
//# sourceMappingURL=voice-call.js.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { SpokenTimeline } from './spoken-timeline.js';
|
|
2
|
+
import type { CallReading } from './voice-call-protocol.js';
|
|
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
|
+
}
|