fix decode audio
Browse files- front/package-lock.json +0 -200
- front/package.json +0 -1
- front/src/utils/utils.ts +7 -2
front/package-lock.json
CHANGED
@@ -10,7 +10,6 @@
|
|
10 |
"dependencies": {
|
11 |
"@gradio/client": "^1.12.0",
|
12 |
"@sec-ant/readable-stream": "^0.6.0",
|
13 |
-
"audio-decode": "^2.2.2",
|
14 |
"autoprefixer": "^10.4.20",
|
15 |
"base64-arraybuffer": "^1.0.2",
|
16 |
"postcss": "^8.5.2",
|
@@ -781,12 +780,6 @@
|
|
781 |
"node": ">=18"
|
782 |
}
|
783 |
},
|
784 |
-
"node_modules/@eshaz/web-worker": {
|
785 |
-
"version": "1.2.2",
|
786 |
-
"resolved": "https://registry.npmjs.org/@eshaz/web-worker/-/web-worker-1.2.2.tgz",
|
787 |
-
"integrity": "sha512-WxXiHFmD9u/owrzempiDlBB1ZYqiLnm9s6aPc8AlFQalq2tKmqdmMr9GXOupDgzXtqnBipj8Un0gkIm7Sjf8mw==",
|
788 |
-
"license": "Apache-2.0"
|
789 |
-
},
|
790 |
"node_modules/@eslint-community/eslint-utils": {
|
791 |
"version": "4.4.1",
|
792 |
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz",
|
@@ -1598,55 +1591,6 @@
|
|
1598 |
"integrity": "sha512-uiBh8DrB5FN35gP6/o8JEhEQ7/ci1jUsOZO/VMUjyvTpjtV54VstOXVj1TvTj/wsT23pfX6butxxh3qufsW3+g==",
|
1599 |
"license": "MIT"
|
1600 |
},
|
1601 |
-
"node_modules/@thi.ng/bitstream": {
|
1602 |
-
"version": "2.4.12",
|
1603 |
-
"resolved": "https://registry.npmjs.org/@thi.ng/bitstream/-/bitstream-2.4.12.tgz",
|
1604 |
-
"integrity": "sha512-89v8XLbkgGfVFmoTTq4TPZU44BkrmwVyOSz4PIaBkxRFkVeQCf/MOLi2qjluUJMpbmOb9BFh2OjvmKCakGgZFQ==",
|
1605 |
-
"funding": [
|
1606 |
-
{
|
1607 |
-
"type": "github",
|
1608 |
-
"url": "https://github.com/sponsors/postspectacular"
|
1609 |
-
},
|
1610 |
-
{
|
1611 |
-
"type": "patreon",
|
1612 |
-
"url": "https://patreon.com/thing_umbrella"
|
1613 |
-
},
|
1614 |
-
{
|
1615 |
-
"type": "liberapay",
|
1616 |
-
"url": "https://liberapay.com/thi.ng"
|
1617 |
-
}
|
1618 |
-
],
|
1619 |
-
"license": "Apache-2.0",
|
1620 |
-
"dependencies": {
|
1621 |
-
"@thi.ng/errors": "^2.5.26"
|
1622 |
-
},
|
1623 |
-
"engines": {
|
1624 |
-
"node": ">=18"
|
1625 |
-
}
|
1626 |
-
},
|
1627 |
-
"node_modules/@thi.ng/errors": {
|
1628 |
-
"version": "2.5.26",
|
1629 |
-
"resolved": "https://registry.npmjs.org/@thi.ng/errors/-/errors-2.5.26.tgz",
|
1630 |
-
"integrity": "sha512-BnuETWjhmGyE/1MDY9sUQL0YfwvOlzQjWIZkLP8WhlJdl8VoECn+YpNrcQdRFP3uzDu1v+95paddt+KGEIxmcw==",
|
1631 |
-
"funding": [
|
1632 |
-
{
|
1633 |
-
"type": "github",
|
1634 |
-
"url": "https://github.com/sponsors/postspectacular"
|
1635 |
-
},
|
1636 |
-
{
|
1637 |
-
"type": "patreon",
|
1638 |
-
"url": "https://patreon.com/thing_umbrella"
|
1639 |
-
},
|
1640 |
-
{
|
1641 |
-
"type": "liberapay",
|
1642 |
-
"url": "https://liberapay.com/thi.ng"
|
1643 |
-
}
|
1644 |
-
],
|
1645 |
-
"license": "Apache-2.0",
|
1646 |
-
"engines": {
|
1647 |
-
"node": ">=18"
|
1648 |
-
}
|
1649 |
-
},
|
1650 |
"node_modules/@types/babel__core": {
|
1651 |
"version": "7.20.5",
|
1652 |
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
@@ -1988,44 +1932,6 @@
|
|
1988 |
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0"
|
1989 |
}
|
1990 |
},
|
1991 |
-
"node_modules/@wasm-audio-decoders/common": {
|
1992 |
-
"version": "9.0.5",
|
1993 |
-
"resolved": "https://registry.npmjs.org/@wasm-audio-decoders/common/-/common-9.0.5.tgz",
|
1994 |
-
"integrity": "sha512-b9JNh9sPAvn8PVIizNh9D60WkfQong/u9ea873H47u7zvVDLctxYIp2aZw9CQqXaQdk7JB3MoU5UHiseO40swg==",
|
1995 |
-
"license": "MIT",
|
1996 |
-
"dependencies": {
|
1997 |
-
"@eshaz/web-worker": "1.2.2",
|
1998 |
-
"simple-yenc": "^1.0.4"
|
1999 |
-
}
|
2000 |
-
},
|
2001 |
-
"node_modules/@wasm-audio-decoders/flac": {
|
2002 |
-
"version": "0.2.5",
|
2003 |
-
"resolved": "https://registry.npmjs.org/@wasm-audio-decoders/flac/-/flac-0.2.5.tgz",
|
2004 |
-
"integrity": "sha512-8M//CgB3PlkWwn47KcwD0tO6DZBA7/AGG0ukHSG0G97UbNEUNINvKDWAKPVWznzHsqeBP6axw+K/38dzng64JA==",
|
2005 |
-
"license": "MIT",
|
2006 |
-
"dependencies": {
|
2007 |
-
"@wasm-audio-decoders/common": "9.0.5",
|
2008 |
-
"codec-parser": "2.5.0"
|
2009 |
-
},
|
2010 |
-
"funding": {
|
2011 |
-
"type": "individual",
|
2012 |
-
"url": "https://github.com/sponsors/eshaz"
|
2013 |
-
}
|
2014 |
-
},
|
2015 |
-
"node_modules/@wasm-audio-decoders/ogg-vorbis": {
|
2016 |
-
"version": "0.1.16",
|
2017 |
-
"resolved": "https://registry.npmjs.org/@wasm-audio-decoders/ogg-vorbis/-/ogg-vorbis-0.1.16.tgz",
|
2018 |
-
"integrity": "sha512-HcEx4LPZbbzjhs9bTXgMaXLVCSMSo/egY9paJxAnE9tsYbvseAaGtVddLYktl3Qi/G+nW/ZzUXg4144izJjqCw==",
|
2019 |
-
"license": "MIT",
|
2020 |
-
"dependencies": {
|
2021 |
-
"@wasm-audio-decoders/common": "9.0.5",
|
2022 |
-
"codec-parser": "2.5.0"
|
2023 |
-
},
|
2024 |
-
"funding": {
|
2025 |
-
"type": "individual",
|
2026 |
-
"url": "https://github.com/sponsors/eshaz"
|
2027 |
-
}
|
2028 |
-
},
|
2029 |
"node_modules/acorn": {
|
2030 |
"version": "8.14.0",
|
2031 |
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
|
@@ -2152,37 +2058,6 @@
|
|
2152 |
"dev": true,
|
2153 |
"license": "Python-2.0"
|
2154 |
},
|
2155 |
-
"node_modules/audio-buffer": {
|
2156 |
-
"version": "5.0.0",
|
2157 |
-
"resolved": "https://registry.npmjs.org/audio-buffer/-/audio-buffer-5.0.0.tgz",
|
2158 |
-
"integrity": "sha512-gsDyj1wwUp8u7NBB+eW6yhLb9ICf+0eBmDX8NGaAS00w8/fLqFdxUlL5Ge/U8kB64DlQhdonxYC59dXy1J7H/w==",
|
2159 |
-
"license": "MIT"
|
2160 |
-
},
|
2161 |
-
"node_modules/audio-decode": {
|
2162 |
-
"version": "2.2.2",
|
2163 |
-
"resolved": "https://registry.npmjs.org/audio-decode/-/audio-decode-2.2.2.tgz",
|
2164 |
-
"integrity": "sha512-xyh7z6dpRT+5Ez4ggV2cEkSShkDvvIBBmVPR3kYY7uIBqRO1BGNjofip6JnjBnvezhrU3ypBGZjepyKFDZWnDw==",
|
2165 |
-
"license": "MIT",
|
2166 |
-
"dependencies": {
|
2167 |
-
"@wasm-audio-decoders/flac": "^0.2.4",
|
2168 |
-
"@wasm-audio-decoders/ogg-vorbis": "^0.1.15",
|
2169 |
-
"audio-buffer": "^5.0.0",
|
2170 |
-
"audio-type": "^2.2.1",
|
2171 |
-
"mpg123-decoder": "^1.0.0",
|
2172 |
-
"node-wav": "^0.0.2",
|
2173 |
-
"ogg-opus-decoder": "^1.6.12",
|
2174 |
-
"qoa-format": "^1.0.1"
|
2175 |
-
}
|
2176 |
-
},
|
2177 |
-
"node_modules/audio-type": {
|
2178 |
-
"version": "2.2.1",
|
2179 |
-
"resolved": "https://registry.npmjs.org/audio-type/-/audio-type-2.2.1.tgz",
|
2180 |
-
"integrity": "sha512-En9AY6EG1qYqEy5L/quryzbA4akBpJrnBZNxeKTqGHC2xT9Qc4aZ8b7CcbOMFTTc/MGdoNyp+SN4zInZNKxMYA==",
|
2181 |
-
"license": "MIT",
|
2182 |
-
"engines": {
|
2183 |
-
"node": ">=14"
|
2184 |
-
}
|
2185 |
-
},
|
2186 |
"node_modules/autoprefixer": {
|
2187 |
"version": "10.4.20",
|
2188 |
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz",
|
@@ -2458,12 +2333,6 @@
|
|
2458 |
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
2459 |
}
|
2460 |
},
|
2461 |
-
"node_modules/codec-parser": {
|
2462 |
-
"version": "2.5.0",
|
2463 |
-
"resolved": "https://registry.npmjs.org/codec-parser/-/codec-parser-2.5.0.tgz",
|
2464 |
-
"integrity": "sha512-Ru9t80fV8B0ZiixQl8xhMTLru+dzuis/KQld32/x5T/+3LwZb0/YvQdSKytX9JqCnRdiupvAvyYJINKrXieziQ==",
|
2465 |
-
"license": "LGPL-3.0-or-later"
|
2466 |
-
},
|
2467 |
"node_modules/color-convert": {
|
2468 |
"version": "2.0.1",
|
2469 |
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
@@ -3827,19 +3696,6 @@
|
|
3827 |
"node": ">=16 || 14 >=14.17"
|
3828 |
}
|
3829 |
},
|
3830 |
-
"node_modules/mpg123-decoder": {
|
3831 |
-
"version": "1.0.0",
|
3832 |
-
"resolved": "https://registry.npmjs.org/mpg123-decoder/-/mpg123-decoder-1.0.0.tgz",
|
3833 |
-
"integrity": "sha512-WV+pyuMUhRqv7s8S6p/Ii4KQHdBD1pb3yaABxcKJRsNp+HQ/Y6z2iIBIaOZu0JMHPTOoICYt0REDZ7XfLu+n/g==",
|
3834 |
-
"license": "MIT",
|
3835 |
-
"dependencies": {
|
3836 |
-
"@wasm-audio-decoders/common": "9.0.5"
|
3837 |
-
},
|
3838 |
-
"funding": {
|
3839 |
-
"type": "individual",
|
3840 |
-
"url": "https://github.com/sponsors/eshaz"
|
3841 |
-
}
|
3842 |
-
},
|
3843 |
"node_modules/ms": {
|
3844 |
"version": "2.1.3",
|
3845 |
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
@@ -3954,15 +3810,6 @@
|
|
3954 |
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
|
3955 |
"license": "MIT"
|
3956 |
},
|
3957 |
-
"node_modules/node-wav": {
|
3958 |
-
"version": "0.0.2",
|
3959 |
-
"resolved": "https://registry.npmjs.org/node-wav/-/node-wav-0.0.2.tgz",
|
3960 |
-
"integrity": "sha512-M6Rm/bbG6De/gKGxOpeOobx/dnGuP0dz40adqx38boqHhlWssBJZgLCPBNtb9NkrmnKYiV04xELq+R6PFOnoLA==",
|
3961 |
-
"license": "MIT",
|
3962 |
-
"engines": {
|
3963 |
-
"node": ">=4.4.0"
|
3964 |
-
}
|
3965 |
-
},
|
3966 |
"node_modules/normalize-path": {
|
3967 |
"version": "3.0.0",
|
3968 |
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
@@ -4002,21 +3849,6 @@
|
|
4002 |
"node": ">= 6"
|
4003 |
}
|
4004 |
},
|
4005 |
-
"node_modules/ogg-opus-decoder": {
|
4006 |
-
"version": "1.6.14",
|
4007 |
-
"resolved": "https://registry.npmjs.org/ogg-opus-decoder/-/ogg-opus-decoder-1.6.14.tgz",
|
4008 |
-
"integrity": "sha512-RQpk9yFl/mqXFwcgf1BrEYWL92HZk++aU1fOO8mPZ1+1DUYbJdpdUQEFfbPE1xcBkRGU3p75DjEO+EDMNeikFQ==",
|
4009 |
-
"license": "MIT",
|
4010 |
-
"dependencies": {
|
4011 |
-
"@wasm-audio-decoders/common": "9.0.5",
|
4012 |
-
"codec-parser": "2.5.0",
|
4013 |
-
"opus-decoder": "0.7.7"
|
4014 |
-
},
|
4015 |
-
"funding": {
|
4016 |
-
"type": "individual",
|
4017 |
-
"url": "https://github.com/sponsors/eshaz"
|
4018 |
-
}
|
4019 |
-
},
|
4020 |
"node_modules/optionator": {
|
4021 |
"version": "0.9.4",
|
4022 |
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
|
@@ -4035,19 +3867,6 @@
|
|
4035 |
"node": ">= 0.8.0"
|
4036 |
}
|
4037 |
},
|
4038 |
-
"node_modules/opus-decoder": {
|
4039 |
-
"version": "0.7.7",
|
4040 |
-
"resolved": "https://registry.npmjs.org/opus-decoder/-/opus-decoder-0.7.7.tgz",
|
4041 |
-
"integrity": "sha512-KWDyCi/9aXnNN+jrjs+aaVdwiwzDdac81S9ul0iv1CTs4+5K4VDZKuJjIImrYOBA2oSNHDjVq4xzn6BE+XbI1A==",
|
4042 |
-
"license": "MIT",
|
4043 |
-
"dependencies": {
|
4044 |
-
"@wasm-audio-decoders/common": "9.0.5"
|
4045 |
-
},
|
4046 |
-
"funding": {
|
4047 |
-
"type": "individual",
|
4048 |
-
"url": "https://github.com/sponsors/eshaz"
|
4049 |
-
}
|
4050 |
-
},
|
4051 |
"node_modules/outvariant": {
|
4052 |
"version": "1.4.3",
|
4053 |
"resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz",
|
@@ -4396,15 +4215,6 @@
|
|
4396 |
"node": ">=6"
|
4397 |
}
|
4398 |
},
|
4399 |
-
"node_modules/qoa-format": {
|
4400 |
-
"version": "1.0.1",
|
4401 |
-
"resolved": "https://registry.npmjs.org/qoa-format/-/qoa-format-1.0.1.tgz",
|
4402 |
-
"integrity": "sha512-dMB0Z6XQjdpz/Cw4Rf6RiBpQvUSPCfYlQMWvmuWlWkAT7nDQD29cVZ1SwDUB6DYJSitHENwbt90lqfI+7bvMcw==",
|
4403 |
-
"license": "MIT",
|
4404 |
-
"dependencies": {
|
4405 |
-
"@thi.ng/bitstream": "^2.2.12"
|
4406 |
-
}
|
4407 |
-
},
|
4408 |
"node_modules/querystringify": {
|
4409 |
"version": "2.2.0",
|
4410 |
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
@@ -5053,16 +4863,6 @@
|
|
5053 |
"url": "https://github.com/sponsors/isaacs"
|
5054 |
}
|
5055 |
},
|
5056 |
-
"node_modules/simple-yenc": {
|
5057 |
-
"version": "1.0.4",
|
5058 |
-
"resolved": "https://registry.npmjs.org/simple-yenc/-/simple-yenc-1.0.4.tgz",
|
5059 |
-
"integrity": "sha512-5gvxpSd79e9a3V4QDYUqnqxeD4HGlhCakVpb6gMnDD7lexJggSBJRBO5h52y/iJrdXRilX9UCuDaIJhSWm5OWw==",
|
5060 |
-
"license": "MIT",
|
5061 |
-
"funding": {
|
5062 |
-
"type": "individual",
|
5063 |
-
"url": "https://github.com/sponsors/eshaz"
|
5064 |
-
}
|
5065 |
-
},
|
5066 |
"node_modules/source-map-js": {
|
5067 |
"version": "1.2.1",
|
5068 |
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
|
|
10 |
"dependencies": {
|
11 |
"@gradio/client": "^1.12.0",
|
12 |
"@sec-ant/readable-stream": "^0.6.0",
|
|
|
13 |
"autoprefixer": "^10.4.20",
|
14 |
"base64-arraybuffer": "^1.0.2",
|
15 |
"postcss": "^8.5.2",
|
|
|
780 |
"node": ">=18"
|
781 |
}
|
782 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
783 |
"node_modules/@eslint-community/eslint-utils": {
|
784 |
"version": "4.4.1",
|
785 |
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz",
|
|
|
1591 |
"integrity": "sha512-uiBh8DrB5FN35gP6/o8JEhEQ7/ci1jUsOZO/VMUjyvTpjtV54VstOXVj1TvTj/wsT23pfX6butxxh3qufsW3+g==",
|
1592 |
"license": "MIT"
|
1593 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1594 |
"node_modules/@types/babel__core": {
|
1595 |
"version": "7.20.5",
|
1596 |
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
|
|
1932 |
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0"
|
1933 |
}
|
1934 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1935 |
"node_modules/acorn": {
|
1936 |
"version": "8.14.0",
|
1937 |
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
|
|
|
2058 |
"dev": true,
|
2059 |
"license": "Python-2.0"
|
2060 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2061 |
"node_modules/autoprefixer": {
|
2062 |
"version": "10.4.20",
|
2063 |
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz",
|
|
|
2333 |
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
2334 |
}
|
2335 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
2336 |
"node_modules/color-convert": {
|
2337 |
"version": "2.0.1",
|
2338 |
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
|
3696 |
"node": ">=16 || 14 >=14.17"
|
3697 |
}
|
3698 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3699 |
"node_modules/ms": {
|
3700 |
"version": "2.1.3",
|
3701 |
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
|
3810 |
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
|
3811 |
"license": "MIT"
|
3812 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3813 |
"node_modules/normalize-path": {
|
3814 |
"version": "3.0.0",
|
3815 |
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
|
|
3849 |
"node": ">= 6"
|
3850 |
}
|
3851 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3852 |
"node_modules/optionator": {
|
3853 |
"version": "0.9.4",
|
3854 |
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
|
|
|
3867 |
"node": ">= 0.8.0"
|
3868 |
}
|
3869 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3870 |
"node_modules/outvariant": {
|
3871 |
"version": "1.4.3",
|
3872 |
"resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz",
|
|
|
4215 |
"node": ">=6"
|
4216 |
}
|
4217 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4218 |
"node_modules/querystringify": {
|
4219 |
"version": "2.2.0",
|
4220 |
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
|
|
4863 |
"url": "https://github.com/sponsors/isaacs"
|
4864 |
}
|
4865 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4866 |
"node_modules/source-map-js": {
|
4867 |
"version": "1.2.1",
|
4868 |
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
front/package.json
CHANGED
@@ -13,7 +13,6 @@
|
|
13 |
"dependencies": {
|
14 |
"@gradio/client": "^1.12.0",
|
15 |
"@sec-ant/readable-stream": "^0.6.0",
|
16 |
-
"audio-decode": "^2.2.2",
|
17 |
"autoprefixer": "^10.4.20",
|
18 |
"base64-arraybuffer": "^1.0.2",
|
19 |
"postcss": "^8.5.2",
|
|
|
13 |
"dependencies": {
|
14 |
"@gradio/client": "^1.12.0",
|
15 |
"@sec-ant/readable-stream": "^0.6.0",
|
|
|
16 |
"autoprefixer": "^10.4.20",
|
17 |
"base64-arraybuffer": "^1.0.2",
|
18 |
"postcss": "^8.5.2",
|
front/src/utils/utils.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
// @ts-expect-error this package does not have typing
|
2 |
import TextLineStream from 'textlinestream';
|
3 |
import { Client } from '@gradio/client';
|
4 |
-
import decodeAudio from 'audio-decode';
|
5 |
|
6 |
// ponyfill for missing ReadableStream asyncIterator on Safari
|
7 |
import { asyncIterator } from '@sec-ant/readable-stream/ponyfill/asyncIterator';
|
@@ -214,7 +213,13 @@ export const joinAudio = (
|
|
214 |
export const loadWavAndDecode = async (url: string): Promise<AudioBuffer> => {
|
215 |
const response = await fetch(url);
|
216 |
const arrayBuffer = await response.arrayBuffer();
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
return audioBuffer;
|
219 |
};
|
220 |
|
|
|
1 |
// @ts-expect-error this package does not have typing
|
2 |
import TextLineStream from 'textlinestream';
|
3 |
import { Client } from '@gradio/client';
|
|
|
4 |
|
5 |
// ponyfill for missing ReadableStream asyncIterator on Safari
|
6 |
import { asyncIterator } from '@sec-ant/readable-stream/ponyfill/asyncIterator';
|
|
|
213 |
export const loadWavAndDecode = async (url: string): Promise<AudioBuffer> => {
|
214 |
const response = await fetch(url);
|
215 |
const arrayBuffer = await response.arrayBuffer();
|
216 |
+
// @ts-expect-error this is fine
|
217 |
+
const AudioContext = window.AudioContext || window.webkitAudioContext;
|
218 |
+
if (!AudioContext) {
|
219 |
+
throw new Error('AudioContext is not supported on this browser');
|
220 |
+
}
|
221 |
+
const audioCtx = new AudioContext();
|
222 |
+
const audioBuffer = await audioCtx.decodeAudioData(arrayBuffer);
|
223 |
return audioBuffer;
|
224 |
};
|
225 |
|