@slycode/slycode 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/messaging/index.js +4 -2
- package/dist/messaging/index.js.map +1 -1
- package/dist/messaging/stt.d.ts +1 -0
- package/dist/messaging/stt.js +66 -57
- package/dist/messaging/stt.js.map +1 -1
- package/dist/messaging/types.d.ts +1 -0
- package/dist/web/.next/BUILD_ID +1 -1
- package/dist/web/.next/build-manifest.json +2 -2
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/auth/httpAuthSchemeProvider.js +126 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/endpoint/endpointResolver.js +33 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/index.js +3057 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/models/S3ServiceException.js +12 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/models/errors.js +203 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/runtimeConfig.js +67 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/runtimeConfig.shared.js +56 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/schemas/schemas_0.js +3258 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/package.json +127 -0
- package/dist/web/.next/prerender-manifest.json +3 -3
- package/dist/web/.next/server/app/_global-error.html +2 -2
- package/dist/web/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/.next/server/app/_not-found.rsc +2 -2
- package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/web/.next/server/app/api/cli-assets/assistant/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/fix/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/import/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/store/preview/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/store/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/sync/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/cli-assets/updates/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/dashboard/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/file/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/git-status/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/kanban/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/kanban/stream/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/projects/reorder/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/scheduler/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/search/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/sly-actions/invalidate/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/sly-actions/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/transcribe/route.js +5 -5
- package/dist/web/.next/server/app/api/transcribe/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/api/version-check/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/page.js.nft.json +1 -1
- package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app/project/[id]/page.js.nft.json +1 -1
- package/dist/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/chunks/[root-of-the-server]__1b9e0d6e._.js +19 -0
- package/dist/web/.next/server/chunks/{[root-of-the-server]__104b2da3._.js → [root-of-the-server]__4297cb97._.js} +3 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__52da7fe0._.js +5 -0
- package/dist/web/.next/server/chunks/{[root-of-the-server]__41df0777._.js → [root-of-the-server]__cf14e306._.js} +2 -2
- package/dist/web/.next/server/chunks/[root-of-the-server]__d5272169._.js +3 -0
- package/dist/web/.next/server/chunks/[root-of-the-server]__d56e68cb._.js +3 -0
- package/dist/web/.next/server/chunks/[root-of-the-server]__f5dae2ad._.js +3 -0
- package/dist/web/.next/server/chunks/{node_modules_ec9ae6c4._.js → node_modules_269a84e6._.js} +5 -5
- package/dist/web/.next/server/chunks/node_modules_9fc3887b._.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_@aws-sdk_credential-provider-sso_dist-es_loadSso_570f147e.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_@aws-sdk_nested-clients_dist-es_submodules_sts_index_c78619b3.js +1 -1
- package/dist/web/.next/server/chunks/node_modules_@smithy_smithy-client_dist-es_create-aggregated-client_db42850b.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_c58ca22f._.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_f96dfac4._.js +7 -0
- package/dist/web/.next/server/pages/404.html +1 -1
- package/dist/web/.next/server/pages/500.html +2 -2
- package/dist/web/.next/server/server-reference-manifest.js +1 -1
- package/dist/web/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/.next/static/chunks/{0bab8c7c82cef548.js → 17bf7ad67057dc74.js} +1 -1
- package/dist/web/.next/static/chunks/{1b46e836090e130b.js → 29b5d391d655a999.js} +1 -1
- package/dist/web/.next/static/chunks/3df3846316317676.css +1 -0
- package/dist/web/.next/static/chunks/{345c46e638c28d26.js → 8cb404d087e9f3c7.js} +1 -1
- package/dist/web/.next/static/chunks/{de965b463aff71a9.js → e8b318caa49fce00.js} +1 -1
- package/dist/web/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +119 -0
- package/dist/web/node_modules/@aws/lambda-invoke-store/package.json +55 -0
- package/dist/web/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js +31 -0
- package/dist/web/node_modules/@aws-crypto/crc32/build/main/index.js +108 -0
- package/dist/web/node_modules/@aws-crypto/crc32/package.json +32 -0
- package/dist/web/node_modules/@aws-crypto/crc32c/build/main/aws_crc32c.js +31 -0
- package/dist/web/node_modules/@aws-crypto/crc32c/build/main/index.js +78 -0
- package/dist/web/node_modules/@aws-crypto/crc32c/package.json +32 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/convertToBuffer.js +24 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/index.js +14 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/isEmptyData.js +13 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/numToUint8.js +15 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js +20 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +32 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/package.json +60 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +47 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/package.json +61 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js +65 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/package.json +66 -0
- package/dist/web/node_modules/@aws-crypto/util/package.json +32 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/auth/httpAuthSchemeProvider.js +126 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js +33 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +3057 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/models/S3ServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/models/errors.js +203 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +67 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +56 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/schemas/schemas_0.js +3258 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/package.json +127 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/index.js +2212 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +307 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1859 -0
- package/dist/web/node_modules/@aws-sdk/core/package.json +121 -0
- package/dist/web/node_modules/@aws-sdk/crc64-nvme/dist-cjs/index.js +101 -0
- package/dist/web/node_modules/@aws-sdk/crc64-nvme/package.json +50 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +41 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-env/package.json +63 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +46 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +70 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +53 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +17 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +5 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/package.json +70 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +224 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-ini/package.json +74 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +286 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-login/package.json +68 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +156 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-node/package.json +72 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +79 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-process/package.json +64 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +192 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +8 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-sso/package.json +66 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +34 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +62 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/package.json +73 -0
- package/dist/web/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-cjs/index.js +352 -0
- package/dist/web/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +60 -0
- package/dist/web/node_modules/@aws-sdk/middleware-expect-continue/dist-cjs/index.js +48 -0
- package/dist/web/node_modules/@aws-sdk/middleware-expect-continue/package.json +58 -0
- package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/getCrc32ChecksumAlgorithmFunction.js +26 -0
- package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +451 -0
- package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +78 -0
- package/dist/web/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +41 -0
- package/dist/web/node_modules/@aws-sdk/middleware-host-header/package.json +59 -0
- package/dist/web/node_modules/@aws-sdk/middleware-location-constraint/dist-cjs/index.js +30 -0
- package/dist/web/node_modules/@aws-sdk/middleware-location-constraint/package.json +57 -0
- package/dist/web/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +48 -0
- package/dist/web/node_modules/@aws-sdk/middleware-logger/package.json +59 -0
- package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +29 -0
- package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js +33 -0
- package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/package.json +63 -0
- package/dist/web/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +570 -0
- package/dist/web/node_modules/@aws-sdk/middleware-sdk-s3/package.json +72 -0
- package/dist/web/node_modules/@aws-sdk/middleware-ssec/dist-cjs/index.js +73 -0
- package/dist/web/node_modules/@aws-sdk/middleware-ssec/package.json +57 -0
- package/dist/web/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +194 -0
- package/dist/web/node_modules/@aws-sdk/middleware-user-agent/package.json +63 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/auth/httpAuthSchemeProvider.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/ruleset.js +133 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +170 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/SigninServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/errors.js +64 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.js +53 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.shared.js +49 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/schemas/schemas_0.js +125 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/auth/httpAuthSchemeProvider.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/ruleset.js +106 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +160 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/SSOServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/errors.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.js +53 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.shared.js +49 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/schemas/schemas_0.js +90 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +106 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +172 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/SSOOIDCServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/errors.js +195 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.js +53 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.shared.js +49 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/schemas/schemas_0.js +140 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js +54 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +62 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/EndpointParameters.js +19 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js +145 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +202 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/STSServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/errors.js +95 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js +67 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js +50 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeExtensions.js +13 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/schemas/schemas_0.js +195 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/package.json +147 -0
- package/dist/web/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +38 -0
- package/dist/web/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js +20 -0
- package/dist/web/node_modules/@aws-sdk/region-config-resolver/package.json +62 -0
- package/dist/web/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +121 -0
- package/dist/web/node_modules/@aws-sdk/signature-v4-multi-region/package.json +61 -0
- package/dist/web/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +157 -0
- package/dist/web/node_modules/@aws-sdk/token-providers/package.json +70 -0
- package/dist/web/node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@aws-sdk/util-arn-parser/package.json +55 -0
- package/dist/web/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +406 -0
- package/dist/web/node_modules/@aws-sdk/util-endpoints/package.json +60 -0
- package/dist/web/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +185 -0
- package/dist/web/node_modules/@aws-sdk/util-user-agent-node/package.json +69 -0
- package/dist/web/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +131 -0
- package/dist/web/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +23 -0
- package/dist/web/node_modules/@aws-sdk/xml-builder/package.json +63 -0
- package/dist/web/node_modules/@smithy/config-resolver/dist-cjs/index.js +198 -0
- package/dist/web/node_modules/@smithy/config-resolver/package.json +66 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/index.js +345 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1096 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +259 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +884 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +698 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +694 -0
- package/dist/web/node_modules/@smithy/core/package.json +146 -0
- package/dist/web/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +372 -0
- package/dist/web/node_modules/@smithy/credential-provider-imds/package.json +70 -0
- package/dist/web/node_modules/@smithy/eventstream-codec/dist-cjs/index.js +388 -0
- package/dist/web/node_modules/@smithy/eventstream-codec/package.json +65 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +7 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-config-resolver/package.json +62 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js +53 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-node/package.json +62 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js +132 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-universal/package.json +66 -0
- package/dist/web/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +233 -0
- package/dist/web/node_modules/@smithy/fetch-http-handler/package.json +69 -0
- package/dist/web/node_modules/@smithy/hash-node/dist-cjs/index.js +42 -0
- package/dist/web/node_modules/@smithy/hash-node/package.json +65 -0
- package/dist/web/node_modules/@smithy/hash-stream-node/dist-cjs/index.js +67 -0
- package/dist/web/node_modules/@smithy/hash-stream-node/package.json +65 -0
- package/dist/web/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
- package/dist/web/node_modules/@smithy/is-array-buffer/package.json +61 -0
- package/dist/web/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +46 -0
- package/dist/web/node_modules/@smithy/middleware-content-length/package.json +64 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +7 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +35 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +264 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/package.json +75 -0
- package/dist/web/node_modules/@smithy/middleware-retry/dist-cjs/index.js +355 -0
- package/dist/web/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +7 -0
- package/dist/web/node_modules/@smithy/middleware-retry/package.json +79 -0
- package/dist/web/node_modules/@smithy/middleware-serde/dist-cjs/index.js +104 -0
- package/dist/web/node_modules/@smithy/middleware-serde/package.json +66 -0
- package/dist/web/node_modules/@smithy/middleware-stack/dist-cjs/index.js +285 -0
- package/dist/web/node_modules/@smithy/middleware-stack/package.json +64 -0
- package/dist/web/node_modules/@smithy/node-config-provider/dist-cjs/index.js +62 -0
- package/dist/web/node_modules/@smithy/node-config-provider/package.json +66 -0
- package/dist/web/node_modules/@smithy/node-http-handler/dist-cjs/index.js +762 -0
- package/dist/web/node_modules/@smithy/node-http-handler/package.json +68 -0
- package/dist/web/node_modules/@smithy/property-provider/dist-cjs/index.js +117 -0
- package/dist/web/node_modules/@smithy/property-provider/package.json +61 -0
- package/dist/web/node_modules/@smithy/protocol-http/dist-cjs/index.js +169 -0
- package/dist/web/node_modules/@smithy/protocol-http/package.json +62 -0
- package/dist/web/node_modules/@smithy/querystring-builder/dist-cjs/index.js +26 -0
- package/dist/web/node_modules/@smithy/querystring-builder/package.json +61 -0
- package/dist/web/node_modules/@smithy/querystring-parser/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@smithy/querystring-parser/package.json +61 -0
- package/dist/web/node_modules/@smithy/service-error-classification/dist-cjs/index.js +77 -0
- package/dist/web/node_modules/@smithy/service-error-classification/package.json +60 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +26 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +12 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +15 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +196 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js +16 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/package.json +73 -0
- package/dist/web/node_modules/@smithy/signature-v4/dist-cjs/index.js +556 -0
- package/dist/web/node_modules/@smithy/signature-v4/package.json +70 -0
- package/dist/web/node_modules/@smithy/smithy-client/dist-cjs/index.js +635 -0
- package/dist/web/node_modules/@smithy/smithy-client/package.json +70 -0
- package/dist/web/node_modules/@smithy/types/dist-cjs/index.js +91 -0
- package/dist/web/node_modules/@smithy/types/package.json +61 -0
- package/dist/web/node_modules/@smithy/url-parser/dist-cjs/index.js +23 -0
- package/dist/web/node_modules/@smithy/url-parser/package.json +62 -0
- package/dist/web/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +16 -0
- package/dist/web/node_modules/@smithy/util-base64/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@smithy/util-base64/dist-cjs/toBase64.js +19 -0
- package/dist/web/node_modules/@smithy/util-base64/package.json +74 -0
- package/dist/web/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +30 -0
- package/dist/web/node_modules/@smithy/util-body-length-browser/package.json +61 -0
- package/dist/web/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +32 -0
- package/dist/web/node_modules/@smithy/util-body-length-node/package.json +62 -0
- package/dist/web/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
- package/dist/web/node_modules/@smithy/util-buffer-from/package.json +62 -0
- package/dist/web/node_modules/@smithy/util-config-provider/dist-cjs/index.js +30 -0
- package/dist/web/node_modules/@smithy/util-config-provider/package.json +63 -0
- package/dist/web/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +74 -0
- package/dist/web/node_modules/@smithy/util-defaults-mode-node/package.json +67 -0
- package/dist/web/node_modules/@smithy/util-endpoints/dist-cjs/index.js +472 -0
- package/dist/web/node_modules/@smithy/util-endpoints/package.json +69 -0
- package/dist/web/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +38 -0
- package/dist/web/node_modules/@smithy/util-hex-encoding/package.json +61 -0
- package/dist/web/node_modules/@smithy/util-middleware/dist-cjs/index.js +15 -0
- package/dist/web/node_modules/@smithy/util-middleware/package.json +67 -0
- package/dist/web/node_modules/@smithy/util-retry/dist-cjs/index.js +278 -0
- package/dist/web/node_modules/@smithy/util-retry/package.json +71 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +36 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +7 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +64 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +39 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +12 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +60 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +103 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js +31 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +41 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +34 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/headStream.js +42 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/index.js +108 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +68 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +54 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +10 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/splitStream.js +16 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +10 -0
- package/dist/web/node_modules/@smithy/util-stream/package.json +99 -0
- package/dist/web/node_modules/@smithy/util-uri-escape/dist-cjs/index.js +9 -0
- package/dist/web/node_modules/@smithy/util-uri-escape/package.json +60 -0
- package/dist/web/node_modules/@smithy/util-utf8/dist-cjs/index.js +32 -0
- package/dist/web/node_modules/@smithy/util-utf8/package.json +67 -0
- package/dist/web/node_modules/@smithy/util-waiter/dist-cjs/index.js +179 -0
- package/dist/web/node_modules/@smithy/util-waiter/package.json +63 -0
- package/dist/web/node_modules/@smithy/uuid/dist-cjs/index.js +36 -0
- package/dist/web/node_modules/@smithy/uuid/dist-cjs/randomUUID.js +6 -0
- package/dist/web/node_modules/@smithy/uuid/package.json +66 -0
- package/dist/web/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/dist/web/node_modules/fast-xml-parser/package.json +94 -0
- package/dist/web/node_modules/tslib/package.json +47 -0
- package/dist/web/node_modules/tslib/tslib.js +484 -0
- package/dist/web/package-lock.json +470 -161
- package/dist/web/package.json +3 -1
- package/dist/web/src/app/api/transcribe/route.ts +84 -68
- package/dist/web/src/components/VoiceControlBar.tsx +1 -0
- package/dist/web/src/lib/webm-to-ogg-opus.ts +254 -0
- package/dist/web/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/templates/kanban-seed.json +1 -1
- package/dist/web/.next/server/chunks/[root-of-the-server]__0f8687da._.js +0 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__1cdc76ef._.js +0 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__3998d59e._.js +0 -19
- package/dist/web/.next/server/chunks/[root-of-the-server]__3dc5531f._.js +0 -5
- package/dist/web/.next/server/chunks/[root-of-the-server]__403750fd._.js +0 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__934c9bb4._.js +0 -5
- package/dist/web/.next/server/chunks/[root-of-the-server]__e00fb85f._.js +0 -9
- package/dist/web/.next/server/chunks/a9bf9_@aws-sdk_core_dist-es_submodules_protocols_json_AwsRestJsonProtocol_764d7a83.js +0 -3
- package/dist/web/.next/static/chunks/f3d7065d54a0b9ac.css +0 -1
- /package/dist/web/.next/static/{_fCicMElBguqtWA_EpzdZ → rlJUIaeDUP-JDj2nvHySS}/_buildManifest.js +0 -0
- /package/dist/web/.next/static/{_fCicMElBguqtWA_EpzdZ → rlJUIaeDUP-JDj2nvHySS}/_clientMiddlewareManifest.json +0 -0
- /package/dist/web/.next/static/{_fCicMElBguqtWA_EpzdZ → rlJUIaeDUP-JDj2nvHySS}/_ssgManifest.js +0 -0
package/dist/web/package.json
CHANGED
|
@@ -11,13 +11,15 @@
|
|
|
11
11
|
"lint": "eslint"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@aws-sdk/client-
|
|
14
|
+
"@aws-sdk/client-s3": "^3.1013.0",
|
|
15
|
+
"@aws-sdk/client-transcribe": "^3.1013.0",
|
|
15
16
|
"@tailwindcss/typography": "^0.5.19",
|
|
16
17
|
"@xterm/addon-fit": "^0.11.0",
|
|
17
18
|
"@xterm/addon-web-links": "^0.12.0",
|
|
18
19
|
"@xterm/xterm": "^6.0.0",
|
|
19
20
|
"croner": "^10.0.1",
|
|
20
21
|
"diff": "^8.0.3",
|
|
22
|
+
"ebml": "^3.0.0",
|
|
21
23
|
"next": "16.1.6",
|
|
22
24
|
"openai": "^6.23.0",
|
|
23
25
|
"react": "19.2.3",
|
|
@@ -5,15 +5,17 @@ import path from 'path';
|
|
|
5
5
|
import { execFile } from 'child_process';
|
|
6
6
|
import { getSlycodeRoot } from '@/lib/paths';
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
TranscribeClient,
|
|
9
|
+
StartTranscriptionJobCommand,
|
|
10
|
+
GetTranscriptionJobCommand,
|
|
11
11
|
type LanguageCode,
|
|
12
|
-
|
|
13
|
-
} from '@aws-sdk/client-
|
|
12
|
+
} from '@aws-sdk/client-transcribe';
|
|
13
|
+
import { S3Client, PutObjectCommand, DeleteObjectCommand } from '@aws-sdk/client-s3';
|
|
14
|
+
|
|
14
15
|
|
|
15
16
|
let openaiClient: OpenAI | null = null;
|
|
16
|
-
let transcribeClient:
|
|
17
|
+
let transcribeClient: TranscribeClient | null = null;
|
|
18
|
+
let s3Client: S3Client | null = null;
|
|
17
19
|
let envLoaded = false;
|
|
18
20
|
let envCache: Record<string, string> = {};
|
|
19
21
|
|
|
@@ -49,13 +51,20 @@ async function getClient(): Promise<OpenAI> {
|
|
|
49
51
|
return openaiClient;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
function getTranscribeClient(region?: string):
|
|
54
|
+
function getTranscribeClient(region?: string): TranscribeClient {
|
|
53
55
|
if (!transcribeClient) {
|
|
54
|
-
transcribeClient = new
|
|
56
|
+
transcribeClient = new TranscribeClient(region ? { region } : {});
|
|
55
57
|
}
|
|
56
58
|
return transcribeClient;
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
function getS3Client(region?: string): S3Client {
|
|
62
|
+
if (!s3Client) {
|
|
63
|
+
s3Client = new S3Client(region ? { region } : {});
|
|
64
|
+
}
|
|
65
|
+
return s3Client;
|
|
66
|
+
}
|
|
67
|
+
|
|
59
68
|
function execAsync(cmd: string, args: string[], options: Record<string, unknown>): Promise<string> {
|
|
60
69
|
return new Promise((resolve, reject) => {
|
|
61
70
|
execFile(cmd, args, { ...options, windowsHide: true }, (error, stdout, stderr) => {
|
|
@@ -91,75 +100,77 @@ async function transcribeLocal(audioBuffer: Buffer, ext: string, cliPath: string
|
|
|
91
100
|
}
|
|
92
101
|
}
|
|
93
102
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const isOgg = ext === 'ogg' || ext === 'oga';
|
|
98
|
-
|
|
99
|
-
let streamBuffer: Buffer;
|
|
100
|
-
let mediaEncoding: MediaEncoding;
|
|
101
|
-
let sampleRate: number;
|
|
102
|
-
let pcmPath: string | null = null;
|
|
103
|
-
|
|
104
|
-
if (isOgg) {
|
|
105
|
-
// OGG/Opus can be sent directly
|
|
106
|
-
streamBuffer = audioBuffer;
|
|
107
|
-
mediaEncoding = 'ogg-opus';
|
|
108
|
-
sampleRate = 48000;
|
|
109
|
-
} else {
|
|
110
|
-
// Convert WebM/MP4 to PCM via ffmpeg
|
|
111
|
-
const tmpDir = process.env.TMPDIR || '/tmp';
|
|
112
|
-
const tmpFile = path.join(tmpDir, `transcribe_${Date.now()}.${ext}`);
|
|
113
|
-
pcmPath = tmpFile.replace(/\.[^.]+$/, '.pcm');
|
|
103
|
+
function sleep(ms: number): Promise<void> {
|
|
104
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
105
|
+
}
|
|
114
106
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
107
|
+
async function transcribeAwsBatch(
|
|
108
|
+
audioBuffer: Buffer,
|
|
109
|
+
ext: string,
|
|
110
|
+
region: string,
|
|
111
|
+
language: string,
|
|
112
|
+
s3Bucket: string,
|
|
113
|
+
): Promise<string> {
|
|
114
|
+
const transcribe = getTranscribeClient(region || undefined);
|
|
115
|
+
const s3 = getS3Client(region || undefined);
|
|
116
|
+
|
|
117
|
+
// Batch API accepts webm, ogg, mp4 directly — no conversion needed
|
|
118
|
+
const mediaFormat = ext === 'webm' ? 'webm' : (ext === 'oga' || ext === 'ogg') ? 'ogg' : ext === 'mp4' ? 'mp4' : 'wav';
|
|
119
|
+
const jobName = `stt-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
120
|
+
const s3Key = `stt-temp/${jobName}.${ext}`;
|
|
121
|
+
|
|
122
|
+
// Upload audio to S3
|
|
123
|
+
await s3.send(new PutObjectCommand({
|
|
124
|
+
Bucket: s3Bucket,
|
|
125
|
+
Key: s3Key,
|
|
126
|
+
Body: audioBuffer,
|
|
127
|
+
}));
|
|
136
128
|
|
|
137
129
|
try {
|
|
138
|
-
|
|
130
|
+
// Start transcription job
|
|
131
|
+
await transcribe.send(new StartTranscriptionJobCommand({
|
|
132
|
+
TranscriptionJobName: jobName,
|
|
139
133
|
LanguageCode: language as LanguageCode,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
AudioStream: audioStream(),
|
|
134
|
+
MediaFormat: mediaFormat,
|
|
135
|
+
Media: { MediaFileUri: `s3://${s3Bucket}/${s3Key}` },
|
|
143
136
|
}));
|
|
144
137
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
138
|
+
// Poll for completion
|
|
139
|
+
let status = 'IN_PROGRESS';
|
|
140
|
+
let resultUri = '';
|
|
141
|
+
while (status === 'IN_PROGRESS' || status === 'QUEUED') {
|
|
142
|
+
await sleep(1500);
|
|
143
|
+
const result = await transcribe.send(new GetTranscriptionJobCommand({
|
|
144
|
+
TranscriptionJobName: jobName,
|
|
145
|
+
}));
|
|
146
|
+
status = result.TranscriptionJob?.TranscriptionJobStatus || 'FAILED';
|
|
147
|
+
if (status === 'COMPLETED') {
|
|
148
|
+
resultUri = result.TranscriptionJob?.Transcript?.TranscriptFileUri || '';
|
|
149
|
+
}
|
|
150
|
+
if (status === 'FAILED') {
|
|
151
|
+
const reason = result.TranscriptionJob?.FailureReason || 'Unknown error';
|
|
152
|
+
throw new Error(`AWS Transcribe job failed: ${reason}`);
|
|
155
153
|
}
|
|
156
154
|
}
|
|
157
155
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (pcmPath) {
|
|
161
|
-
await fs.unlink(pcmPath).catch(() => {});
|
|
156
|
+
if (!resultUri) {
|
|
157
|
+
throw new Error('AWS Transcribe completed but no transcript URI returned');
|
|
162
158
|
}
|
|
159
|
+
|
|
160
|
+
// Fetch transcript JSON from the presigned URI
|
|
161
|
+
const response = await fetch(resultUri);
|
|
162
|
+
if (!response.ok) {
|
|
163
|
+
throw new Error(`Failed to fetch transcript: ${response.status} ${response.statusText}`);
|
|
164
|
+
}
|
|
165
|
+
const data = await response.json() as {
|
|
166
|
+
results?: { transcripts?: Array<{ transcript?: string }> };
|
|
167
|
+
};
|
|
168
|
+
return (data.results?.transcripts?.[0]?.transcript || '').trim();
|
|
169
|
+
} finally {
|
|
170
|
+
// Clean up S3 object
|
|
171
|
+
try {
|
|
172
|
+
await s3.send(new DeleteObjectCommand({ Bucket: s3Bucket, Key: s3Key }));
|
|
173
|
+
} catch { /* ignore cleanup errors */ }
|
|
163
174
|
}
|
|
164
175
|
}
|
|
165
176
|
|
|
@@ -192,8 +203,13 @@ export async function POST(request: Request) {
|
|
|
192
203
|
if (backend === 'aws-transcribe') {
|
|
193
204
|
const region = process.env.AWS_TRANSCRIBE_REGION || env.AWS_TRANSCRIBE_REGION || '';
|
|
194
205
|
const language = process.env.AWS_TRANSCRIBE_LANGUAGE || env.AWS_TRANSCRIBE_LANGUAGE || 'en-AU';
|
|
206
|
+
const s3Bucket = process.env.AWS_TRANSCRIBE_S3_BUCKET || env.AWS_TRANSCRIBE_S3_BUCKET || '';
|
|
207
|
+
|
|
208
|
+
if (!s3Bucket) {
|
|
209
|
+
return NextResponse.json({ error: 'AWS Transcribe not configured: set AWS_TRANSCRIBE_S3_BUCKET' }, { status: 401 });
|
|
210
|
+
}
|
|
195
211
|
|
|
196
|
-
const text = await
|
|
212
|
+
const text = await transcribeAwsBatch(buffer, ext, region, language, s3Bucket);
|
|
197
213
|
return NextResponse.json({ text });
|
|
198
214
|
}
|
|
199
215
|
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebM/Opus → OGG/Opus remuxer (pure JS, no ffmpeg).
|
|
3
|
+
*
|
|
4
|
+
* Extracts Opus packets from a WebM container and wraps them in a valid
|
|
5
|
+
* OGG Opus stream per RFC 7845. Only handles single-track audio-only WebM
|
|
6
|
+
* from browser MediaRecorder — not arbitrary Matroska files.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
10
|
+
const { Decoder: EbmlDecoder } = require('ebml');
|
|
11
|
+
|
|
12
|
+
// --- OGG CRC-32 (polynomial 0x04C11DB7, no bit reversal) ---
|
|
13
|
+
|
|
14
|
+
const crcTable = new Uint32Array(256);
|
|
15
|
+
for (let i = 0; i < 256; i++) {
|
|
16
|
+
let r = i << 24;
|
|
17
|
+
for (let j = 0; j < 8; j++) {
|
|
18
|
+
r = r & 0x80000000 ? ((r << 1) ^ 0x04C11DB7) : (r << 1);
|
|
19
|
+
r = r >>> 0; // keep unsigned 32-bit
|
|
20
|
+
}
|
|
21
|
+
crcTable[i] = r;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function oggCrc32(data: Uint8Array): number {
|
|
25
|
+
let crc = 0;
|
|
26
|
+
for (let i = 0; i < data.length; i++) {
|
|
27
|
+
crc = ((crc << 8) ^ crcTable[((crc >>> 24) ^ data[i]) & 0xff]) >>> 0;
|
|
28
|
+
}
|
|
29
|
+
return crc;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// --- Opus packet duration parsing ---
|
|
33
|
+
|
|
34
|
+
function getOpusPacketDuration48k(packet: Uint8Array): number {
|
|
35
|
+
if (packet.length < 1) return 960; // fallback: 20ms
|
|
36
|
+
|
|
37
|
+
const toc = packet[0];
|
|
38
|
+
const config = (toc >> 3) & 0x1f;
|
|
39
|
+
const frameCountCode = toc & 0x03;
|
|
40
|
+
|
|
41
|
+
// Frame size in 48kHz samples based on config number
|
|
42
|
+
let frameSamples: number;
|
|
43
|
+
if (config <= 11) {
|
|
44
|
+
// SILK: 10ms, 20ms, 40ms, 60ms
|
|
45
|
+
frameSamples = [480, 960, 1920, 2880][config % 4];
|
|
46
|
+
} else if (config <= 15) {
|
|
47
|
+
// Hybrid: 10ms, 20ms
|
|
48
|
+
frameSamples = [480, 960][(config - 12) % 2];
|
|
49
|
+
} else {
|
|
50
|
+
// CELT: 2.5ms, 5ms, 10ms, 20ms
|
|
51
|
+
frameSamples = [120, 240, 480, 960][(config - 16) % 4];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Number of frames per packet
|
|
55
|
+
let frameCount: number;
|
|
56
|
+
switch (frameCountCode) {
|
|
57
|
+
case 0: frameCount = 1; break;
|
|
58
|
+
case 1: frameCount = 2; break;
|
|
59
|
+
case 2: frameCount = 2; break;
|
|
60
|
+
case 3:
|
|
61
|
+
frameCount = packet.length >= 2 ? (packet[1] & 0x3f) : 1;
|
|
62
|
+
break;
|
|
63
|
+
default: frameCount = 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return frameSamples * frameCount;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// --- OGG page writer ---
|
|
70
|
+
|
|
71
|
+
function writeOggPage(
|
|
72
|
+
serialNumber: number,
|
|
73
|
+
sequenceNumber: number,
|
|
74
|
+
granulePosition: bigint,
|
|
75
|
+
flags: number, // 0x02 = BOS, 0x04 = EOS, 0x01 = continued
|
|
76
|
+
packets: Uint8Array[],
|
|
77
|
+
): Buffer {
|
|
78
|
+
// Build segment table: each packet is split into 255-byte segments + remainder
|
|
79
|
+
const segmentSizes: number[] = [];
|
|
80
|
+
for (const pkt of packets) {
|
|
81
|
+
let remaining = pkt.length;
|
|
82
|
+
while (remaining >= 255) {
|
|
83
|
+
segmentSizes.push(255);
|
|
84
|
+
remaining -= 255;
|
|
85
|
+
}
|
|
86
|
+
segmentSizes.push(remaining); // final segment (0-254), 0 means exactly N*255 bytes
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const payloadSize = packets.reduce((sum, p) => sum + p.length, 0);
|
|
90
|
+
const headerSize = 27 + segmentSizes.length;
|
|
91
|
+
const pageSize = headerSize + payloadSize;
|
|
92
|
+
const page = Buffer.alloc(pageSize);
|
|
93
|
+
|
|
94
|
+
// Capture pattern
|
|
95
|
+
page.write('OggS', 0);
|
|
96
|
+
// Version
|
|
97
|
+
page[4] = 0;
|
|
98
|
+
// Header type flags
|
|
99
|
+
page[5] = flags;
|
|
100
|
+
// Granule position (64-bit little-endian)
|
|
101
|
+
page.writeBigInt64LE(granulePosition, 6);
|
|
102
|
+
// Serial number
|
|
103
|
+
page.writeUInt32LE(serialNumber, 14);
|
|
104
|
+
// Page sequence number
|
|
105
|
+
page.writeUInt32LE(sequenceNumber, 18);
|
|
106
|
+
// CRC placeholder (filled after)
|
|
107
|
+
page.writeUInt32LE(0, 22);
|
|
108
|
+
// Number of segments
|
|
109
|
+
page[26] = segmentSizes.length;
|
|
110
|
+
// Segment table
|
|
111
|
+
for (let i = 0; i < segmentSizes.length; i++) {
|
|
112
|
+
page[27 + i] = segmentSizes[i];
|
|
113
|
+
}
|
|
114
|
+
// Payload
|
|
115
|
+
let offset = headerSize;
|
|
116
|
+
for (const pkt of packets) {
|
|
117
|
+
Buffer.from(pkt).copy(page, offset);
|
|
118
|
+
offset += pkt.length;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Compute and write CRC
|
|
122
|
+
const crc = oggCrc32(page);
|
|
123
|
+
page.writeUInt32LE(crc, 22);
|
|
124
|
+
|
|
125
|
+
return page;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// --- WebM parsing ---
|
|
129
|
+
|
|
130
|
+
interface WebmParseResult {
|
|
131
|
+
opusHead: Buffer;
|
|
132
|
+
codecDelay: number; // nanoseconds
|
|
133
|
+
packets: Uint8Array[];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function parseWebmOpus(webmBuffer: Buffer): WebmParseResult {
|
|
137
|
+
const decoder = new EbmlDecoder();
|
|
138
|
+
let opusHead: Buffer | null = null;
|
|
139
|
+
let codecDelay = 0;
|
|
140
|
+
let audioTrack = 1;
|
|
141
|
+
const packets: Uint8Array[] = [];
|
|
142
|
+
|
|
143
|
+
// Track whether we're inside a TrackEntry to associate CodecPrivate with the right track
|
|
144
|
+
let inTrackEntry = false;
|
|
145
|
+
let currentTrackNumber = 0;
|
|
146
|
+
let currentCodecId = '';
|
|
147
|
+
|
|
148
|
+
const events: Array<[string, Record<string, unknown>]> = [];
|
|
149
|
+
decoder.on('data', (chunk: [string, Record<string, unknown>]) => events.push(chunk));
|
|
150
|
+
decoder.write(webmBuffer);
|
|
151
|
+
decoder.end();
|
|
152
|
+
|
|
153
|
+
for (const [type, tag] of events) {
|
|
154
|
+
const name = tag.name as string;
|
|
155
|
+
|
|
156
|
+
if (type === 'start' && name === 'TrackEntry') {
|
|
157
|
+
inTrackEntry = true;
|
|
158
|
+
currentTrackNumber = 0;
|
|
159
|
+
currentCodecId = '';
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (type === 'end' && name === 'TrackEntry') {
|
|
163
|
+
if (currentCodecId === 'A_OPUS' && currentTrackNumber > 0) {
|
|
164
|
+
audioTrack = currentTrackNumber;
|
|
165
|
+
}
|
|
166
|
+
inTrackEntry = false;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (type === 'tag' && inTrackEntry) {
|
|
170
|
+
if (name === 'TrackNumber') {
|
|
171
|
+
currentTrackNumber = tag.value as number;
|
|
172
|
+
}
|
|
173
|
+
if (name === 'CodecID') {
|
|
174
|
+
currentCodecId = tag.value as string;
|
|
175
|
+
}
|
|
176
|
+
if (name === 'CodecPrivate') {
|
|
177
|
+
opusHead = Buffer.from(tag.data as Uint8Array);
|
|
178
|
+
}
|
|
179
|
+
if (name === 'CodecDelay') {
|
|
180
|
+
codecDelay = tag.value as number;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (type === 'tag' && name === 'SimpleBlock') {
|
|
185
|
+
const track = tag.track as number;
|
|
186
|
+
const payload = tag.payload as Uint8Array | null;
|
|
187
|
+
if (track === audioTrack && payload && payload.length > 0) {
|
|
188
|
+
packets.push(Uint8Array.from(payload));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (!opusHead) {
|
|
194
|
+
throw new Error('No Opus CodecPrivate (OpusHead) found in WebM');
|
|
195
|
+
}
|
|
196
|
+
if (packets.length === 0) {
|
|
197
|
+
throw new Error('No Opus audio packets found in WebM');
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return { opusHead, codecDelay, packets };
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// --- Main remux function ---
|
|
204
|
+
|
|
205
|
+
export function remuxWebmToOgg(webmBuffer: Buffer): Buffer {
|
|
206
|
+
const { opusHead, codecDelay, packets } = parseWebmOpus(webmBuffer);
|
|
207
|
+
|
|
208
|
+
const serialNumber = Math.floor(Math.random() * 0xFFFFFFFF);
|
|
209
|
+
let sequenceNumber = 0;
|
|
210
|
+
|
|
211
|
+
// Pre-skip: convert CodecDelay from nanoseconds to 48kHz samples
|
|
212
|
+
// Also read pre-skip from OpusHead itself (bytes 10-11, little-endian uint16)
|
|
213
|
+
const opusHeadPreSkip = opusHead.readUInt16LE(10);
|
|
214
|
+
const preSkip = codecDelay > 0
|
|
215
|
+
? Math.round(codecDelay / 1e9 * 48000)
|
|
216
|
+
: opusHeadPreSkip;
|
|
217
|
+
|
|
218
|
+
// If CodecDelay-derived pre-skip differs from OpusHead, patch OpusHead
|
|
219
|
+
const finalOpusHead = Buffer.from(opusHead);
|
|
220
|
+
if (preSkip !== opusHeadPreSkip) {
|
|
221
|
+
finalOpusHead.writeUInt16LE(preSkip, 10);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const pages: Buffer[] = [];
|
|
225
|
+
|
|
226
|
+
// Page 0: OpusHead (BOS)
|
|
227
|
+
pages.push(writeOggPage(serialNumber, sequenceNumber++, BigInt(0), 0x02, [finalOpusHead]));
|
|
228
|
+
|
|
229
|
+
// Page 1: OpusTags
|
|
230
|
+
const vendor = Buffer.from('remux');
|
|
231
|
+
const opusTags = Buffer.alloc(8 + 4 + vendor.length + 4);
|
|
232
|
+
opusTags.write('OpusTags', 0);
|
|
233
|
+
opusTags.writeUInt32LE(vendor.length, 8);
|
|
234
|
+
vendor.copy(opusTags, 12);
|
|
235
|
+
opusTags.writeUInt32LE(0, 12 + vendor.length); // zero user comments
|
|
236
|
+
pages.push(writeOggPage(serialNumber, sequenceNumber++, BigInt(0), 0, [opusTags]));
|
|
237
|
+
|
|
238
|
+
// Data pages: one packet per page for simplicity
|
|
239
|
+
let granulePosition = BigInt(preSkip); // starts at pre-skip per RFC 7845
|
|
240
|
+
for (let i = 0; i < packets.length; i++) {
|
|
241
|
+
const duration = getOpusPacketDuration48k(packets[i]);
|
|
242
|
+
granulePosition += BigInt(duration);
|
|
243
|
+
const isLast = i === packets.length - 1;
|
|
244
|
+
pages.push(writeOggPage(
|
|
245
|
+
serialNumber,
|
|
246
|
+
sequenceNumber++,
|
|
247
|
+
granulePosition,
|
|
248
|
+
isLast ? 0x04 : 0, // EOS on last page
|
|
249
|
+
[packets[i]],
|
|
250
|
+
));
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return Buffer.concat(pages);
|
|
254
|
+
}
|