From 2682503abb384bf08c5e8b974b4fcbdf2ea9ae7b Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 20:19:19 +0000 Subject: [PATCH] SDK regeneration --- poetry.lock | 163 +++---- pyproject.toml | 2 +- src/hume/empathic_voice/chat/client.py.diff | 422 ----------------- .../empathic_voice/chat/raw_client.py.diff | 112 ----- .../empathic_voice/chat/socket_client.py.diff | 161 ------- src/hume/empathic_voice/client.py.diff | 201 -------- .../batch/types/inference_job.py.diff | 24 - .../expression_measurement/client.py.diff | 70 --- .../stream/stream/socket_client.py.diff | 170 ------- src/hume/tts/client.py.diff | 438 ------------------ 10 files changed, 74 insertions(+), 1689 deletions(-) delete mode 100644 src/hume/empathic_voice/chat/client.py.diff delete mode 100644 src/hume/empathic_voice/chat/raw_client.py.diff delete mode 100644 src/hume/empathic_voice/chat/socket_client.py.diff delete mode 100644 src/hume/empathic_voice/client.py.diff delete mode 100644 src/hume/expression_measurement/batch/types/inference_job.py.diff delete mode 100644 src/hume/expression_measurement/client.py.diff delete mode 100644 src/hume/expression_measurement/stream/stream/socket_client.py.diff delete mode 100644 src/hume/tts/client.py.diff diff --git a/poetry.lock b/poetry.lock index c29f926d..ef9f0876 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aiofiles" @@ -3220,97 +3220,80 @@ test = ["pytest", "websockets"] [[package]] name = "websockets" -version = "13.1" +version = "15.0.1" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "websockets-13.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f48c749857f8fb598fb890a75f540e3221d0976ed0bf879cf3c7eef34151acee"}, - {file = "websockets-13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c7e72ce6bda6fb9409cc1e8164dd41d7c91466fb599eb047cfda72fe758a34a7"}, - {file = "websockets-13.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f779498eeec470295a2b1a5d97aa1bc9814ecd25e1eb637bd9d1c73a327387f6"}, - {file = "websockets-13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4676df3fe46956fbb0437d8800cd5f2b6d41143b6e7e842e60554398432cf29b"}, - {file = "websockets-13.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7affedeb43a70351bb811dadf49493c9cfd1ed94c9c70095fd177e9cc1541fa"}, - {file = "websockets-13.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1971e62d2caa443e57588e1d82d15f663b29ff9dfe7446d9964a4b6f12c1e700"}, - {file = "websockets-13.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5f2e75431f8dc4a47f31565a6e1355fb4f2ecaa99d6b89737527ea917066e26c"}, - {file = "websockets-13.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:58cf7e75dbf7e566088b07e36ea2e3e2bd5676e22216e4cad108d4df4a7402a0"}, - {file = "websockets-13.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c90d6dec6be2c7d03378a574de87af9b1efea77d0c52a8301dd831ece938452f"}, - {file = "websockets-13.1-cp310-cp310-win32.whl", hash = "sha256:730f42125ccb14602f455155084f978bd9e8e57e89b569b4d7f0f0c17a448ffe"}, - {file = "websockets-13.1-cp310-cp310-win_amd64.whl", hash = "sha256:5993260f483d05a9737073be197371940c01b257cc45ae3f1d5d7adb371b266a"}, - {file = "websockets-13.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:61fc0dfcda609cda0fc9fe7977694c0c59cf9d749fbb17f4e9483929e3c48a19"}, - {file = "websockets-13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ceec59f59d092c5007e815def4ebb80c2de330e9588e101cf8bd94c143ec78a5"}, - {file = "websockets-13.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c1dca61c6db1166c48b95198c0b7d9c990b30c756fc2923cc66f68d17dc558fd"}, - {file = "websockets-13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:308e20f22c2c77f3f39caca508e765f8725020b84aa963474e18c59accbf4c02"}, - {file = "websockets-13.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d516c325e6540e8a57b94abefc3459d7dab8ce52ac75c96cad5549e187e3a7"}, - {file = "websockets-13.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87c6e35319b46b99e168eb98472d6c7d8634ee37750d7693656dc766395df096"}, - {file = "websockets-13.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5f9fee94ebafbc3117c30be1844ed01a3b177bb6e39088bc6b2fa1dc15572084"}, - {file = "websockets-13.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7c1e90228c2f5cdde263253fa5db63e6653f1c00e7ec64108065a0b9713fa1b3"}, - {file = "websockets-13.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6548f29b0e401eea2b967b2fdc1c7c7b5ebb3eeb470ed23a54cd45ef078a0db9"}, - {file = "websockets-13.1-cp311-cp311-win32.whl", hash = "sha256:c11d4d16e133f6df8916cc5b7e3e96ee4c44c936717d684a94f48f82edb7c92f"}, - {file = "websockets-13.1-cp311-cp311-win_amd64.whl", hash = "sha256:d04f13a1d75cb2b8382bdc16ae6fa58c97337253826dfe136195b7f89f661557"}, - {file = "websockets-13.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9d75baf00138f80b48f1eac72ad1535aac0b6461265a0bcad391fc5aba875cfc"}, - {file = "websockets-13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9b6f347deb3dcfbfde1c20baa21c2ac0751afaa73e64e5b693bb2b848efeaa49"}, - {file = "websockets-13.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de58647e3f9c42f13f90ac7e5f58900c80a39019848c5547bc691693098ae1bd"}, - {file = "websockets-13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1b54689e38d1279a51d11e3467dd2f3a50f5f2e879012ce8f2d6943f00e83f0"}, - {file = "websockets-13.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf1781ef73c073e6b0f90af841aaf98501f975d306bbf6221683dd594ccc52b6"}, - {file = "websockets-13.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d23b88b9388ed85c6faf0e74d8dec4f4d3baf3ecf20a65a47b836d56260d4b9"}, - {file = "websockets-13.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3c78383585f47ccb0fcf186dcb8a43f5438bd7d8f47d69e0b56f71bf431a0a68"}, - {file = "websockets-13.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d6d300f8ec35c24025ceb9b9019ae9040c1ab2f01cddc2bcc0b518af31c75c14"}, - {file = "websockets-13.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a9dcaf8b0cc72a392760bb8755922c03e17a5a54e08cca58e8b74f6902b433cf"}, - {file = "websockets-13.1-cp312-cp312-win32.whl", hash = "sha256:2f85cf4f2a1ba8f602298a853cec8526c2ca42a9a4b947ec236eaedb8f2dc80c"}, - {file = "websockets-13.1-cp312-cp312-win_amd64.whl", hash = "sha256:38377f8b0cdeee97c552d20cf1865695fcd56aba155ad1b4ca8779a5b6ef4ac3"}, - {file = "websockets-13.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a9ab1e71d3d2e54a0aa646ab6d4eebfaa5f416fe78dfe4da2839525dc5d765c6"}, - {file = "websockets-13.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b9d7439d7fab4dce00570bb906875734df13d9faa4b48e261c440a5fec6d9708"}, - {file = "websockets-13.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:327b74e915cf13c5931334c61e1a41040e365d380f812513a255aa804b183418"}, - {file = "websockets-13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:325b1ccdbf5e5725fdcb1b0e9ad4d2545056479d0eee392c291c1bf76206435a"}, - {file = "websockets-13.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:346bee67a65f189e0e33f520f253d5147ab76ae42493804319b5716e46dddf0f"}, - {file = "websockets-13.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91a0fa841646320ec0d3accdff5b757b06e2e5c86ba32af2e0815c96c7a603c5"}, - {file = "websockets-13.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:18503d2c5f3943e93819238bf20df71982d193f73dcecd26c94514f417f6b135"}, - {file = "websockets-13.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a9cd1af7e18e5221d2878378fbc287a14cd527fdd5939ed56a18df8a31136bb2"}, - {file = "websockets-13.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:70c5be9f416aa72aab7a2a76c90ae0a4fe2755c1816c153c1a2bcc3333ce4ce6"}, - {file = "websockets-13.1-cp313-cp313-win32.whl", hash = "sha256:624459daabeb310d3815b276c1adef475b3e6804abaf2d9d2c061c319f7f187d"}, - {file = "websockets-13.1-cp313-cp313-win_amd64.whl", hash = "sha256:c518e84bb59c2baae725accd355c8dc517b4a3ed8db88b4bc93c78dae2974bf2"}, - {file = "websockets-13.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c7934fd0e920e70468e676fe7f1b7261c1efa0d6c037c6722278ca0228ad9d0d"}, - {file = "websockets-13.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:149e622dc48c10ccc3d2760e5f36753db9cacf3ad7bc7bbbfd7d9c819e286f23"}, - {file = "websockets-13.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a569eb1b05d72f9bce2ebd28a1ce2054311b66677fcd46cf36204ad23acead8c"}, - {file = "websockets-13.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95df24ca1e1bd93bbca51d94dd049a984609687cb2fb08a7f2c56ac84e9816ea"}, - {file = "websockets-13.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8dbb1bf0c0a4ae8b40bdc9be7f644e2f3fb4e8a9aca7145bfa510d4a374eeb7"}, - {file = "websockets-13.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:035233b7531fb92a76beefcbf479504db8c72eb3bff41da55aecce3a0f729e54"}, - {file = "websockets-13.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:e4450fc83a3df53dec45922b576e91e94f5578d06436871dce3a6be38e40f5db"}, - {file = "websockets-13.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:463e1c6ec853202dd3657f156123d6b4dad0c546ea2e2e38be2b3f7c5b8e7295"}, - {file = "websockets-13.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:6d6855bbe70119872c05107e38fbc7f96b1d8cb047d95c2c50869a46c65a8e96"}, - {file = "websockets-13.1-cp38-cp38-win32.whl", hash = "sha256:204e5107f43095012b00f1451374693267adbb832d29966a01ecc4ce1db26faf"}, - {file = "websockets-13.1-cp38-cp38-win_amd64.whl", hash = "sha256:485307243237328c022bc908b90e4457d0daa8b5cf4b3723fd3c4a8012fce4c6"}, - {file = "websockets-13.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9b37c184f8b976f0c0a231a5f3d6efe10807d41ccbe4488df8c74174805eea7d"}, - {file = "websockets-13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:163e7277e1a0bd9fb3c8842a71661ad19c6aa7bb3d6678dc7f89b17fbcc4aeb7"}, - {file = "websockets-13.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4b889dbd1342820cc210ba44307cf75ae5f2f96226c0038094455a96e64fb07a"}, - {file = "websockets-13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:586a356928692c1fed0eca68b4d1c2cbbd1ca2acf2ac7e7ebd3b9052582deefa"}, - {file = "websockets-13.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7bd6abf1e070a6b72bfeb71049d6ad286852e285f146682bf30d0296f5fbadfa"}, - {file = "websockets-13.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2aad13a200e5934f5a6767492fb07151e1de1d6079c003ab31e1823733ae79"}, - {file = "websockets-13.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:df01aea34b6e9e33572c35cd16bae5a47785e7d5c8cb2b54b2acdb9678315a17"}, - {file = "websockets-13.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e54affdeb21026329fb0744ad187cf812f7d3c2aa702a5edb562b325191fcab6"}, - {file = "websockets-13.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9ef8aa8bdbac47f4968a5d66462a2a0935d044bf35c0e5a8af152d58516dbeb5"}, - {file = "websockets-13.1-cp39-cp39-win32.whl", hash = "sha256:deeb929efe52bed518f6eb2ddc00cc496366a14c726005726ad62c2dd9017a3c"}, - {file = "websockets-13.1-cp39-cp39-win_amd64.whl", hash = "sha256:7c65ffa900e7cc958cd088b9a9157a8141c991f8c53d11087e6fb7277a03f81d"}, - {file = "websockets-13.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5dd6da9bec02735931fccec99d97c29f47cc61f644264eb995ad6c0c27667238"}, - {file = "websockets-13.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:2510c09d8e8df777177ee3d40cd35450dc169a81e747455cc4197e63f7e7bfe5"}, - {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1c3cf67185543730888b20682fb186fc8d0fa6f07ccc3ef4390831ab4b388d9"}, - {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bcc03c8b72267e97b49149e4863d57c2d77f13fae12066622dc78fe322490fe6"}, - {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:004280a140f220c812e65f36944a9ca92d766b6cc4560be652a0a3883a79ed8a"}, - {file = "websockets-13.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e2620453c075abeb0daa949a292e19f56de518988e079c36478bacf9546ced23"}, - {file = "websockets-13.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9156c45750b37337f7b0b00e6248991a047be4aa44554c9886fe6bdd605aab3b"}, - {file = "websockets-13.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:80c421e07973a89fbdd93e6f2003c17d20b69010458d3a8e37fb47874bd67d51"}, - {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82d0ba76371769d6a4e56f7e83bb8e81846d17a6190971e38b5de108bde9b0d7"}, - {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e9875a0143f07d74dc5e1ded1c4581f0d9f7ab86c78994e2ed9e95050073c94d"}, - {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a11e38ad8922c7961447f35c7b17bffa15de4d17c70abd07bfbe12d6faa3e027"}, - {file = "websockets-13.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4059f790b6ae8768471cddb65d3c4fe4792b0ab48e154c9f0a04cefaabcd5978"}, - {file = "websockets-13.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:25c35bf84bf7c7369d247f0b8cfa157f989862c49104c5cf85cb5436a641d93e"}, - {file = "websockets-13.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:83f91d8a9bb404b8c2c41a707ac7f7f75b9442a0a876df295de27251a856ad09"}, - {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a43cfdcddd07f4ca2b1afb459824dd3c6d53a51410636a2c7fc97b9a8cf4842"}, - {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48a2ef1381632a2f0cb4efeff34efa97901c9fbc118e01951ad7cfc10601a9bb"}, - {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:459bf774c754c35dbb487360b12c5727adab887f1622b8aed5755880a21c4a20"}, - {file = "websockets-13.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:95858ca14a9f6fa8413d29e0a585b31b278388aa775b8a81fa24830123874678"}, - {file = "websockets-13.1-py3-none-any.whl", hash = "sha256:a9a396a6ad26130cdae92ae10c36af09d9bfe6cafe69670fd3b6da9b07b4044f"}, - {file = "websockets-13.1.tar.gz", hash = "sha256:a3b3366087c1bc0a2795111edcadddb8b3b59509d5db5d7ea3fdd69f954a8878"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d63efaa0cd96cf0c5fe4d581521d9fa87744540d4bc999ae6e08595a1014b45b"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac60e3b188ec7574cb761b08d50fcedf9d77f1530352db4eef1707fe9dee7205"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5756779642579d902eed757b21b0164cd6fe338506a8083eb58af5c372e39d9a"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdfe3e2a29e4db3659dbd5bbf04560cea53dd9610273917799f1cde46aa725e"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c2529b320eb9e35af0fa3016c187dffb84a3ecc572bcee7c3ce302bfeba52bf"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac1e5c9054fe23226fb11e05a6e630837f074174c4c2f0fe442996112a6de4fb"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5df592cd503496351d6dc14f7cdad49f268d8e618f80dce0cd5a36b93c3fc08d"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a34631031a8f05657e8e90903e656959234f3a04552259458aac0b0f9ae6fd9"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d00075aa65772e7ce9e990cab3ff1de702aa09be3940d1dc88d5abf1ab8a09c"}, + {file = "websockets-15.0.1-cp310-cp310-win32.whl", hash = "sha256:1234d4ef35db82f5446dca8e35a7da7964d02c127b095e172e54397fb6a6c256"}, + {file = "websockets-15.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:39c1fec2c11dc8d89bba6b2bf1556af381611a173ac2b511cf7231622058af41"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf"}, + {file = "websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85"}, + {file = "websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597"}, + {file = "websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9"}, + {file = "websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4"}, + {file = "websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa"}, + {file = "websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5f4c04ead5aed67c8a1a20491d54cdfba5884507a48dd798ecaf13c74c4489f5"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abdc0c6c8c648b4805c5eacd131910d2a7f6455dfd3becab248ef108e89ab16a"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a625e06551975f4b7ea7102bc43895b90742746797e2e14b70ed61c43a90f09b"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d591f8de75824cbb7acad4e05d2d710484f15f29d4a915092675ad3456f11770"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47819cea040f31d670cc8d324bb6435c6f133b8c7a19ec3d61634e62f8d8f9eb"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac017dd64572e5c3bd01939121e4d16cf30e5d7e110a119399cf3133b63ad054"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4a9fac8e469d04ce6c25bb2610dc535235bd4aa14996b4e6dbebf5e007eba5ee"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363c6f671b761efcb30608d24925a382497c12c506b51661883c3e22337265ed"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2034693ad3097d5355bfdacfffcbd3ef5694f9718ab7f29c29689a9eae841880"}, + {file = "websockets-15.0.1-cp39-cp39-win32.whl", hash = "sha256:3b1ac0d3e594bf121308112697cf4b32be538fb1444468fb0a6ae4feebc83411"}, + {file = "websockets-15.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7643a03db5c95c799b89b31c036d5f27eeb4d259c798e878d6937d71832b1e4"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7f493881579c90fc262d9cdbaa05a6b54b3811c2f300766748db79f098db9940"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:47b099e1f4fbc95b701b6e85768e1fcdaf1630f3cbe4765fa216596f12310e2e"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67f2b6de947f8c757db2db9c71527933ad0019737ec374a8a6be9a956786aaf9"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d08eb4c2b7d6c41da6ca0600c077e93f5adcfd979cd777d747e9ee624556da4b"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b826973a4a2ae47ba357e4e82fa44a463b8f168e1ca775ac64521442b19e87f"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:21c1fa28a6a7e3cbdc171c694398b6df4744613ce9b36b1a498e816787e28123"}, + {file = "websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f"}, + {file = "websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee"}, ] [[package]] @@ -3440,4 +3423,4 @@ microphone = ["sounddevice"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "ac3ed54f9220a726793d76d482bfd8200f55fa4620eebc890038d5687305c72b" +content-hash = "0d8c6b62783e6e3a1447345a49dc0a1175830c1bdf378d69c16628085eed419f" diff --git a/pyproject.toml b/pyproject.toml index 62bb52e1..9507520a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ pydantic = ">= 1.9.2" pydantic-core = ">=2.18.2" sounddevice = { version = "^0.4.6", optional = true} typing_extensions = ">= 4.0.0" -websockets = "^13.1" +websockets = ">=12.0" [tool.poetry.group.dev.dependencies] mypy = "==1.13.0" diff --git a/src/hume/empathic_voice/chat/client.py.diff b/src/hume/empathic_voice/chat/client.py.diff deleted file mode 100644 index 29d9577b..00000000 --- a/src/hume/empathic_voice/chat/client.py.diff +++ /dev/null @@ -1,422 +0,0 @@ -diff --git a/src/hume/empathic_voice/chat/client.py b/src/hume/empathic_voice/chat/client.py -index 2a3732f5..910917c9 100644 ---- a/src/hume/empathic_voice/chat/client.py -+++ b/src/hume/empathic_voice/chat/client.py -@@ -1,11 +1,7 @@ - # This file was auto-generated by Fern from our API Definition. - --from contextlib import asynccontextmanager, contextmanager -- --import json - import typing -- --from typing_extensions import deprecated -+from contextlib import asynccontextmanager, contextmanager - - import httpx - import websockets.exceptions -@@ -14,34 +10,16 @@ from ...core.api_error import ApiError - from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper - from ...core.request_options import RequestOptions - from ...core.serialization import convert_and_respect_annotation_metadata --from ...core.query_encoder import single_query_encoder - from ..types.connect_session_settings import ConnectSessionSettings - from .raw_client import AsyncRawChatClient, RawChatClient --from .socket_client import AsyncChatSocketClient, ChatSocketClient, ChatConnectOptions -- --from ...core.events import EventEmitterMixin, EventType --from ...core.pydantic_utilities import parse_obj_as --from ..types.assistant_input import AssistantInput --from ..types.audio_input import AudioInput --from ..types.pause_assistant_message import PauseAssistantMessage --from ..types.resume_assistant_message import ResumeAssistantMessage --from ..types.session_settings import SessionSettings --from ..types.tool_error_message import ToolErrorMessage --from ..types.tool_response_message import ToolResponseMessage --from ..types.user_input import UserInput --from .types.publish_event import PublishEvent --from ..types.subscribe_event import SubscribeEvent -- --from ...core.api_error import ApiError --import asyncio -- --from ...core.websocket import OnErrorHandlerType, OnMessageHandlerType, OnOpenCloseHandlerType -+from .socket_client import AsyncChatSocketClient, ChatSocketClient - - try: - from websockets.legacy.client import connect as websockets_client_connect # type: ignore - except ImportError: - from websockets import connect as websockets_client_connect # type: ignore - -+ - class ChatClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawChatClient(client_wrapper=client_wrapper) -@@ -62,6 +40,7 @@ class ChatClient: - self, - *, - access_token: typing.Optional[str] = None, -+ allow_connection: typing.Optional[bool] = None, - config_id: typing.Optional[str] = None, - config_version: typing.Optional[int] = None, - event_limit: typing.Optional[int] = None, -@@ -69,7 +48,6 @@ class ChatClient: - verbose_transcription: typing.Optional[bool] = None, - api_key: typing.Optional[str] = None, - session_settings: ConnectSessionSettings, -- allow_connection: typing.Optional[bool] = None, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.Iterator[ChatSocketClient]: - """ -@@ -84,6 +62,9 @@ class ChatClient: - - For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). - -+ allow_connection : typing.Optional[bool] -+ Allows external connections to this chat via the /connect endpoint. -+ - config_id : typing.Optional[str] - The unique identifier for an EVI configuration. - -@@ -137,6 +118,8 @@ class ChatClient: - query_params = httpx.QueryParams() - if access_token is not None: - query_params = query_params.add("access_token", access_token) -+ if allow_connection is not None: -+ query_params = query_params.add("allow_connection", allow_connection) - if config_id is not None: - query_params = query_params.add("config_id", config_id) - if config_version is not None: -@@ -149,12 +132,18 @@ class ChatClient: - query_params = query_params.add("verbose_transcription", verbose_transcription) - if api_key is not None: - query_params = query_params.add("api_key", api_key) -- if allow_connection is not None: -- query_params = query_params.add("allow_connection", str(allow_connection).lower()) -- if session_settings is not None: -- flattened_params = single_query_encoder("session_settings", session_settings) -- for param_key, param_value in flattened_params: -- query_params = query_params.add(param_key, str(param_value)) -+ if ( -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ) -+ is not None -+ ): -+ query_params = query_params.add( -+ "session_settings", -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ), -+ ) - ws_url = ws_url + f"?{query_params}" - headers = self._raw_client._client_wrapper.get_headers() - if request_options and "additional_headers" in request_options: -@@ -197,14 +186,14 @@ class AsyncChatClient: - self, - *, - access_token: typing.Optional[str] = None, -+ allow_connection: typing.Optional[bool] = None, - config_id: typing.Optional[str] = None, - config_version: typing.Optional[int] = None, - event_limit: typing.Optional[int] = None, - resumed_chat_group_id: typing.Optional[str] = None, - verbose_transcription: typing.Optional[bool] = None, - api_key: typing.Optional[str] = None, -- session_settings: typing.Optional[ConnectSessionSettings] = None, -- allow_connection: typing.Optional[bool] = None, -+ session_settings: ConnectSessionSettings, - request_options: typing.Optional[RequestOptions] = None, - ) -> typing.AsyncIterator[AsyncChatSocketClient]: - """ -@@ -219,6 +208,9 @@ class AsyncChatClient: - - For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). - -+ allow_connection : typing.Optional[bool] -+ Allows external connections to this chat via the /connect endpoint. -+ - config_id : typing.Optional[str] - The unique identifier for an EVI configuration. - -@@ -261,11 +253,6 @@ class AsyncChatClient: - - session_settings : ConnectSessionSettings - -- allow_connection : typing.Optional[bool] -- Flag that allows the resulting Chat to accept secondary connections via -- the control plane `/connect` endpoint. Defaults to `False` on the server. -- Set to `True` to enable observer connections for the session. -- - request_options : typing.Optional[RequestOptions] - Request-specific configuration. - -@@ -277,6 +264,8 @@ class AsyncChatClient: - query_params = httpx.QueryParams() - if access_token is not None: - query_params = query_params.add("access_token", access_token) -+ if allow_connection is not None: -+ query_params = query_params.add("allow_connection", allow_connection) - if config_id is not None: - query_params = query_params.add("config_id", config_id) - if config_version is not None: -@@ -289,12 +278,18 @@ class AsyncChatClient: - query_params = query_params.add("verbose_transcription", verbose_transcription) - if api_key is not None: - query_params = query_params.add("api_key", api_key) -- if allow_connection is not None: -- query_params = query_params.add("allow_connection", str(allow_connection).lower()) -- if session_settings is not None: -- flattened_params = single_query_encoder("session_settings", session_settings) -- for param_key, param_value in flattened_params: -- query_params = query_params.add(param_key, str(param_value)) -+ if ( -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ) -+ is not None -+ ): -+ query_params = query_params.add( -+ "session_settings", -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ), -+ ) - ws_url = ws_url + f"?{query_params}" - headers = self._raw_client._client_wrapper.get_headers() - if request_options and "additional_headers" in request_options: -@@ -315,234 +310,3 @@ class AsyncChatClient: - headers=dict(headers), - body="Unexpected error when initializing websocket connection.", - ) -- -- @deprecated("") -- async def _wrap_on_open_close( -- self, on_open: typing.Optional[OnOpenCloseHandlerType] -- ): -- if on_open is not None: -- if asyncio.iscoroutinefunction(on_open): -- await on_open() -- else: -- on_open() -- -- @deprecated("") -- async def _wrap_on_error( -- self, exc: Exception, on_error: typing.Optional[OnErrorHandlerType] -- ) -> None: -- if on_error is not None: -- if asyncio.iscoroutinefunction(on_error): -- await on_error(exc) -- else: -- on_error(exc) -- -- @deprecated("") -- async def _wrap_on_message( -- self, -- message: SubscribeEvent, -- on_message: typing.Optional[OnMessageHandlerType[SubscribeEvent]], -- ) -> None: -- if on_message is not None: -- if asyncio.iscoroutinefunction(on_message): -- await on_message(message) -- else: -- on_message(message) -- -- async def _process_connection( -- self, -- connection: AsyncChatSocketClient, -- on_message: typing.Optional[OnMessageHandlerType], -- on_error: typing.Optional[OnErrorHandlerType], -- ) -> None: -- async for message in connection: -- try: -- await self._wrap_on_message(message, on_message) -- except Exception as exc: -- await self._wrap_on_error(exc, on_error) -- -- def _construct_ws_uri(self, options: typing.Optional[ChatConnectOptions]): -- query_params = httpx.QueryParams() -- -- api_key = self._raw_client._client_wrapper.api_key -- if options is not None: -- maybe_api_key = options.get("api_key") -- if maybe_api_key is not None: -- api_key = maybe_api_key -- maybe_config_id = options.get("config_id") -- if maybe_config_id is not None: -- query_params = query_params.add("config_id", maybe_config_id) -- maybe_config_version = options.get("config_version") -- if maybe_config_version is not None: -- query_params = query_params.add( -- "config_version", maybe_config_version -- ) -- maybe_resumed_chat_group_id = options.get("resumed_chat_group_id") -- if maybe_resumed_chat_group_id is not None: -- query_params = query_params.add( -- "resumed_chat_group_id", maybe_resumed_chat_group_id -- ) -- maybe_verbose_transcription = options.get("verbose_transcription") -- if maybe_verbose_transcription is not None: -- query_params = query_params.add( -- "verbose_transcription", -- "true" if maybe_verbose_transcription else "false", -- ) -- elif api_key is not None: -- query_params = query_params.add("apiKey", api_key) -- -- maybe_voice_id = options.get("voice_id") -- if maybe_voice_id is not None: -- query_params = query_params.add("voice_id", maybe_voice_id) -- -- maybe_session_settings = options.get("session_settings") -- if maybe_session_settings is not None: -- # Handle audio settings -- audio = maybe_session_settings.get("audio") -- if audio is not None: -- channels = audio.get("channels") -- if channels is not None: -- query_params = query_params.add( -- "session_settings[audio][channels]", str(channels) -- ) -- encoding = audio.get("encoding") -- if encoding is not None: -- query_params = query_params.add( -- "session_settings[audio][encoding]", str(encoding) -- ) -- sample_rate = audio.get("sample_rate") -- if sample_rate is not None: -- query_params = query_params.add( -- "session_settings[audio][sample_rate]", str(sample_rate) -- ) -- -- # Handle context settings -- context = maybe_session_settings.get("context") -- if context is not None: -- text = context.get("text") -- if text is not None: -- query_params = query_params.add( -- "session_settings[context][text]", str(text) -- ) -- context_type = context.get("type") -- if context_type is not None: -- query_params = query_params.add( -- "session_settings[context][type]", str(context_type) -- ) -- -- # Handle top-level session settings -- custom_session_id = maybe_session_settings.get("custom_session_id") -- if custom_session_id is not None: -- query_params = query_params.add( -- "session_settings[custom_session_id]", str(custom_session_id) -- ) -- -- event_limit = maybe_session_settings.get("event_limit") -- if event_limit is not None: -- query_params = query_params.add( -- "session_settings[event_limit]", str(event_limit) -- ) -- -- language_model_api_key = maybe_session_settings.get("language_model_api_key") -- if language_model_api_key is not None: -- query_params = query_params.add( -- "session_settings[language_model_api_key]", str(language_model_api_key) -- ) -- -- system_prompt = maybe_session_settings.get("system_prompt") -- if system_prompt is not None: -- query_params = query_params.add( -- "session_settings[system_prompt]", str(system_prompt) -- ) -- -- variables = maybe_session_settings.get("variables") -- if variables is not None: -- query_params = query_params.add( -- "session_settings[variables]", json.dumps(variables) -- ) -- -- voice_id_setting = maybe_session_settings.get("voice_id") -- if voice_id_setting is not None: -- query_params = query_params.add( -- "session_settings[voice_id]", str(voice_id_setting) -- ) -- elif api_key is not None: -- query_params = query_params.add("apiKey", api_key) -- -- base = self._raw_client._client_wrapper.get_environment().evi + "/chat" -- return f"{base}?{query_params}" -- -- @deprecated("Use .on() instead.") -- @asynccontextmanager -- async def connect_with_callbacks( -- self, -- options: typing.Optional[ChatConnectOptions] = None, -- on_open: typing.Optional[OnOpenCloseHandlerType] = None, -- on_message: typing.Optional[OnMessageHandlerType[SubscribeEvent]] = None, -- on_close: typing.Optional[OnOpenCloseHandlerType] = None, -- on_error: typing.Optional[OnErrorHandlerType] = None, -- ) -> typing.AsyncIterator["AsyncChatSocketClient"]: -- """ -- Parameters -- ---------- -- on_open : Optional[OnOpenCloseHandlerType] -- A callable to be invoked on the opening of the websocket connection. -- -- on_message : Optional[OnMessageHandlerType[SubscribeEvent]] -- A callable to be invoked on receiving a message from the websocket connection. This callback should expect a `SubscribeEvent` object. -- -- on_close : Optional[OnOpenCloseHandlerType] -- A callable to be invoked on the closing of the websocket connection. -- -- on_error : Optional[OnErrorHandlerType] -- A callable to be invoked on receiving an error from the websocket connection. -- -- Yields -- ------- -- AsyncIterator["AsyncChatSocketClient"] -- """ -- -- ws_uri = self._construct_ws_uri(options) -- -- background_task: typing.Optional[asyncio.Task[None]] = None -- -- try: -- async with websockets.connect( -- ws_uri, -- extra_headers=self._raw_client._client_wrapper.get_headers(), -- ) as protocol: -- await self._wrap_on_open_close(on_open) -- connection = AsyncChatSocketClient(websocket=protocol) -- background_task = asyncio.create_task( -- self._process_connection(connection, on_message, on_error) -- ) -- -- yield connection -- -- # Special case authentication errors -- except websockets.exceptions.InvalidStatusCode as exc: -- status_code: int = exc.status_code -- if status_code == 401: -- raise ApiError( -- status_code=status_code, -- body="Websocket initialized with invalid credentials.", -- ) from exc -- raise ApiError( -- status_code=status_code, -- body="Unexpected error when initializing websocket connection.", -- ) from exc -- -- # Except all other errors to apply the on_error handler -- except Exception as exc: -- await self._wrap_on_error(exc, on_error) -- raise -- -- # Finally, apply the on_close handler -- finally: -- if background_task is not None: -- background_task.cancel() -- try: -- await background_task -- except asyncio.CancelledError: -- pass -- await self._wrap_on_open_close(on_close) -- diff --git a/src/hume/empathic_voice/chat/raw_client.py.diff b/src/hume/empathic_voice/chat/raw_client.py.diff deleted file mode 100644 index cb61a2b3..00000000 --- a/src/hume/empathic_voice/chat/raw_client.py.diff +++ /dev/null @@ -1,112 +0,0 @@ -diff --git a/src/hume/empathic_voice/chat/raw_client.py b/src/hume/empathic_voice/chat/raw_client.py -index fefee870..ed718e98 100644 ---- a/src/hume/empathic_voice/chat/raw_client.py -+++ b/src/hume/empathic_voice/chat/raw_client.py -@@ -10,7 +10,6 @@ from ...core.api_error import ApiError - from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper - from ...core.request_options import RequestOptions - from ...core.serialization import convert_and_respect_annotation_metadata --from ...core.query_encoder import single_query_encoder - from ..types.connect_session_settings import ConnectSessionSettings - from .socket_client import AsyncChatSocketClient, ChatSocketClient - -@@ -29,6 +28,7 @@ class RawChatClient: - self, - *, - access_token: typing.Optional[str] = None, -+ allow_connection: typing.Optional[bool] = None, - config_id: typing.Optional[str] = None, - config_version: typing.Optional[int] = None, - event_limit: typing.Optional[int] = None, -@@ -50,6 +50,9 @@ class RawChatClient: - - For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). - -+ allow_connection : typing.Optional[bool] -+ Allows external connections to this chat via the /connect endpoint. -+ - config_id : typing.Optional[str] - The unique identifier for an EVI configuration. - -@@ -103,6 +106,8 @@ class RawChatClient: - query_params = httpx.QueryParams() - if access_token is not None: - query_params = query_params.add("access_token", access_token) -+ if allow_connection is not None: -+ query_params = query_params.add("allow_connection", allow_connection) - if config_id is not None: - query_params = query_params.add("config_id", config_id) - if config_version is not None: -@@ -115,10 +120,18 @@ class RawChatClient: - query_params = query_params.add("verbose_transcription", verbose_transcription) - if api_key is not None: - query_params = query_params.add("api_key", api_key) -- if session_settings is not None: -- flattened_params = single_query_encoder("session_settings", session_settings) -- for param_key, param_value in flattened_params: -- query_params = query_params.add(param_key, str(param_value)) -+ if ( -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ) -+ is not None -+ ): -+ query_params = query_params.add( -+ "session_settings", -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ), -+ ) - ws_url = ws_url + f"?{query_params}" - headers = self._client_wrapper.get_headers() - if request_options and "additional_headers" in request_options: -@@ -150,6 +163,7 @@ class AsyncRawChatClient: - self, - *, - access_token: typing.Optional[str] = None, -+ allow_connection: typing.Optional[bool] = None, - config_id: typing.Optional[str] = None, - config_version: typing.Optional[int] = None, - event_limit: typing.Optional[int] = None, -@@ -171,6 +185,9 @@ class AsyncRawChatClient: - - For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). - -+ allow_connection : typing.Optional[bool] -+ Allows external connections to this chat via the /connect endpoint. -+ - config_id : typing.Optional[str] - The unique identifier for an EVI configuration. - -@@ -224,6 +241,8 @@ class AsyncRawChatClient: - query_params = httpx.QueryParams() - if access_token is not None: - query_params = query_params.add("access_token", access_token) -+ if allow_connection is not None: -+ query_params = query_params.add("allow_connection", allow_connection) - if config_id is not None: - query_params = query_params.add("config_id", config_id) - if config_version is not None: -@@ -236,10 +255,18 @@ class AsyncRawChatClient: - query_params = query_params.add("verbose_transcription", verbose_transcription) - if api_key is not None: - query_params = query_params.add("api_key", api_key) -- if session_settings is not None: -- flattened_params = single_query_encoder("session_settings", session_settings) -- for param_key, param_value in flattened_params: -- query_params = query_params.add(param_key, str(param_value)) -+ if ( -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ) -+ is not None -+ ): -+ query_params = query_params.add( -+ "session_settings", -+ convert_and_respect_annotation_metadata( -+ object_=session_settings, annotation=ConnectSessionSettings, direction="write" -+ ), -+ ) - ws_url = ws_url + f"?{query_params}" - headers = self._client_wrapper.get_headers() - if request_options and "additional_headers" in request_options: diff --git a/src/hume/empathic_voice/chat/socket_client.py.diff b/src/hume/empathic_voice/chat/socket_client.py.diff deleted file mode 100644 index 77c80ea0..00000000 --- a/src/hume/empathic_voice/chat/socket_client.py.diff +++ /dev/null @@ -1,161 +0,0 @@ -diff --git a/src/hume/empathic_voice/chat/socket_client.py b/src/hume/empathic_voice/chat/socket_client.py -index de3b4a5e..18ee74ab 100644 ---- a/src/hume/empathic_voice/chat/socket_client.py -+++ b/src/hume/empathic_voice/chat/socket_client.py -@@ -6,21 +6,10 @@ from json.decoder import JSONDecodeError - - import websockets - import websockets.sync.connection as websockets_sync_connection --from typing_extensions import deprecated --from contextlib import asynccontextmanager -- - from ...core.events import EventEmitterMixin, EventType - from ...core.pydantic_utilities import parse_obj_as --from ..types.assistant_input import AssistantInput --from ..types.audio_input import AudioInput --from ..types.pause_assistant_message import PauseAssistantMessage --from ..types.resume_assistant_message import ResumeAssistantMessage --from ..types.session_settings import SessionSettings --from ..types.tool_error_message import ToolErrorMessage --from ..types.tool_response_message import ToolResponseMessage --from ..types.user_input import UserInput --from .types.publish_event import PublishEvent - from ..types.subscribe_event import SubscribeEvent -+from .types.publish_event import PublishEvent - - try: - from websockets.legacy.client import WebSocketClientProtocol # type: ignore -@@ -29,58 +18,6 @@ except ImportError: - - ChatSocketClientResponse = typing.Union[SubscribeEvent] - --class ChatConnectSessionSettingsAudio(typing.TypedDict, total=False): -- channels: typing.Optional[int] -- encoding: typing.Optional[str] -- sample_rate: typing.Optional[int] -- -- --class ChatConnectSessionSettingsContext(typing.TypedDict, total=False): -- text: typing.Optional[str] -- -- --SessionSettingsVariablesValue = typing.Union[str, float, bool] -- --class ChatConnectSessionSettings(typing.TypedDict, total=False): -- audio: typing.Optional[ChatConnectSessionSettingsAudio] -- context: typing.Optional[ChatConnectSessionSettingsContext] -- custom_session_id: typing.Optional[str] -- event_limit: typing.Optional[int] -- language_model_api_key: typing.Optional[str] -- system_prompt: typing.Optional[str] -- variables: typing.Optional[typing.Dict[str, SessionSettingsVariablesValue]] -- voice_id: typing.Optional[str] -- --@deprecated("Use .connect() with kwargs instead.") --class ChatConnectOptions(typing.TypedDict, total=False): -- config_id: typing.Optional[str] -- """ -- The ID of the configuration. -- """ -- -- config_version: typing.Optional[str] -- """ -- The version of the configuration. -- """ -- -- api_key: typing.Optional[str] -- -- secret_key: typing.Optional[str] -- -- resumed_chat_group_id: typing.Optional[str] -- -- verbose_transcription: typing.Optional[bool] -- -- """ -- ID of the Voice to use for this chat. If specified, will override the voice set in the Config -- """ -- voice_id: typing.Optional[str] -- -- session_settings: typing.Optional[typing.Dict] -- """ -- Session settings to apply at connection time. Supports all SessionSettings fields except -- builtin_tools, type, metadata, and tools. Additionally supports event_limit. -- """ - - class AsyncChatSocketClient(EventEmitterMixin): - def __init__(self, *, websocket: WebSocketClientProtocol): -@@ -141,38 +78,6 @@ class AsyncChatSocketClient(EventEmitterMixin): - """ - await self._send(data.dict()) - -- @deprecated("Use send_publish instead.") -- async def send_audio_input(self, message: AudioInput) -> None: -- await self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- async def send_session_settings(self, message: SessionSettings) -> None: -- await self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- async def send_user_input(self, message: UserInput) -> None: -- await self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- async def send_assistant_input(self, message: AssistantInput) -> None: -- await self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- async def send_tool_response(self, message: ToolResponseMessage) -> None: -- await self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- async def send_tool_error(self, message: ToolErrorMessage) -> None: -- await self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- async def send_pause_assistant(self, message: PauseAssistantMessage) -> None: -- await self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- async def send_resume_assistant(self, message: ResumeAssistantMessage) -> None: -- await self.send_publish(message) -- - - class ChatSocketClient(EventEmitterMixin): - def __init__(self, *, websocket: websockets_sync_connection.Connection): -@@ -232,35 +137,3 @@ class ChatSocketClient(EventEmitterMixin): - Send a Pydantic model to the websocket connection. - """ - self._send(data.dict()) -- -- @deprecated("Use send_publish instead.") -- def send_audio_input(self, message: AudioInput) -> None: -- self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- def send_session_settings(self, message: SessionSettings) -> None: -- self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- def send_user_input(self, message: UserInput) -> None: -- self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- def send_assistant_input(self, message: AssistantInput) -> None: -- self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- def send_tool_response(self, message: ToolResponseMessage) -> None: -- self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- def send_tool_error(self, message: ToolErrorMessage) -> None: -- self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- def send_pause_assistant(self, message: PauseAssistantMessage) -> None: -- self.send_publish(message) -- -- @deprecated("Use send_publish instead.") -- def send_resume_assistant(self, message: ResumeAssistantMessage) -> None: -- self.send_publish(message) diff --git a/src/hume/empathic_voice/client.py.diff b/src/hume/empathic_voice/client.py.diff deleted file mode 100644 index 84b74be1..00000000 --- a/src/hume/empathic_voice/client.py.diff +++ /dev/null @@ -1,201 +0,0 @@ -diff --git a/src/hume/empathic_voice/client.py b/src/hume/empathic_voice/client.py -index e9119462..241410a1 100644 ---- a/src/hume/empathic_voice/client.py -+++ b/src/hume/empathic_voice/client.py -@@ -4,8 +4,6 @@ from __future__ import annotations - - import typing - --from hume.empathic_voice.chat.client import AsyncChatClient, ChatClient -- - from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper - from .raw_client import AsyncRawEmpathicVoiceClient, RawEmpathicVoiceClient - -@@ -13,6 +11,7 @@ if typing.TYPE_CHECKING: - from .chat_groups.client import AsyncChatGroupsClient, ChatGroupsClient - from .chats.client import AsyncChatsClient, ChatsClient - from .configs.client import AsyncConfigsClient, ConfigsClient -+ from .control_plane.client import AsyncControlPlaneClient, ControlPlaneClient - from .prompts.client import AsyncPromptsClient, PromptsClient - from .tools.client import AsyncToolsClient, ToolsClient - -@@ -21,12 +20,12 @@ class EmpathicVoiceClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawEmpathicVoiceClient(client_wrapper=client_wrapper) - self._client_wrapper = client_wrapper -- self._tools: typing.Optional[ToolsClient] = None -- self._prompts: typing.Optional[PromptsClient] = None -- self._configs: typing.Optional[ConfigsClient] = None -- self._chats: typing.Optional[ChatsClient] = None -+ self._control_plane: typing.Optional[ControlPlaneClient] = None - self._chat_groups: typing.Optional[ChatGroupsClient] = None -- self._chat: typing.Optional[ChatClient] = None -+ self._chats: typing.Optional[ChatsClient] = None -+ self._configs: typing.Optional[ConfigsClient] = None -+ self._prompts: typing.Optional[PromptsClient] = None -+ self._tools: typing.Optional[ToolsClient] = None - - @property - def with_raw_response(self) -> RawEmpathicVoiceClient: -@@ -40,20 +39,28 @@ class EmpathicVoiceClient: - return self._raw_client - - @property -- def tools(self): -- if self._tools is None: -- from .tools.client import ToolsClient # noqa: E402 -+ def control_plane(self): -+ if self._control_plane is None: -+ from .control_plane.client import ControlPlaneClient # noqa: E402 - -- self._tools = ToolsClient(client_wrapper=self._client_wrapper) -- return self._tools -+ self._control_plane = ControlPlaneClient(client_wrapper=self._client_wrapper) -+ return self._control_plane - - @property -- def prompts(self): -- if self._prompts is None: -- from .prompts.client import PromptsClient # noqa: E402 -+ def chat_groups(self): -+ if self._chat_groups is None: -+ from .chat_groups.client import ChatGroupsClient # noqa: E402 - -- self._prompts = PromptsClient(client_wrapper=self._client_wrapper) -- return self._prompts -+ self._chat_groups = ChatGroupsClient(client_wrapper=self._client_wrapper) -+ return self._chat_groups -+ -+ @property -+ def chats(self): -+ if self._chats is None: -+ from .chats.client import ChatsClient # noqa: E402 -+ -+ self._chats = ChatsClient(client_wrapper=self._client_wrapper) -+ return self._chats - - @property - def configs(self): -@@ -64,32 +71,32 @@ class EmpathicVoiceClient: - return self._configs - - @property -- def chats(self): -- if self._chats is None: -- from .chats.client import ChatsClient # noqa: E402 -+ def prompts(self): -+ if self._prompts is None: -+ from .prompts.client import PromptsClient # noqa: E402 - -- self._chats = ChatsClient(client_wrapper=self._client_wrapper) -- return self._chats -+ self._prompts = PromptsClient(client_wrapper=self._client_wrapper) -+ return self._prompts - - @property -- def chat_groups(self): -- if self._chat_groups is None: -- from .chat_groups.client import ChatGroupsClient # noqa: E402 -+ def tools(self): -+ if self._tools is None: -+ from .tools.client import ToolsClient # noqa: E402 - -- self._chat_groups = ChatGroupsClient(client_wrapper=self._client_wrapper) -- return self._chat_groups -+ self._tools = ToolsClient(client_wrapper=self._client_wrapper) -+ return self._tools - - - class AsyncEmpathicVoiceClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawEmpathicVoiceClient(client_wrapper=client_wrapper) - self._client_wrapper = client_wrapper -- self._tools: typing.Optional[AsyncToolsClient] = None -- self._prompts: typing.Optional[AsyncPromptsClient] = None -- self._configs: typing.Optional[AsyncConfigsClient] = None -- self._chats: typing.Optional[AsyncChatsClient] = None -+ self._control_plane: typing.Optional[AsyncControlPlaneClient] = None - self._chat_groups: typing.Optional[AsyncChatGroupsClient] = None -- self._chat: typing.Optional[AsyncChatClient] = None -+ self._chats: typing.Optional[AsyncChatsClient] = None -+ self._configs: typing.Optional[AsyncConfigsClient] = None -+ self._prompts: typing.Optional[AsyncPromptsClient] = None -+ self._tools: typing.Optional[AsyncToolsClient] = None - - @property - def with_raw_response(self) -> AsyncRawEmpathicVoiceClient: -@@ -103,28 +110,20 @@ class AsyncEmpathicVoiceClient: - return self._raw_client - - @property -- def tools(self): -- if self._tools is None: -- from .tools.client import AsyncToolsClient # noqa: E402 -+ def control_plane(self): -+ if self._control_plane is None: -+ from .control_plane.client import AsyncControlPlaneClient # noqa: E402 - -- self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper) -- return self._tools -+ self._control_plane = AsyncControlPlaneClient(client_wrapper=self._client_wrapper) -+ return self._control_plane - - @property -- def prompts(self): -- if self._prompts is None: -- from .prompts.client import AsyncPromptsClient # noqa: E402 -- -- self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper) -- return self._prompts -- -- @property -- def configs(self): -- if self._configs is None: -- from .configs.client import AsyncConfigsClient # noqa: E402 -+ def chat_groups(self): -+ if self._chat_groups is None: -+ from .chat_groups.client import AsyncChatGroupsClient # noqa: E402 - -- self._configs = AsyncConfigsClient(client_wrapper=self._client_wrapper) -- return self._configs -+ self._chat_groups = AsyncChatGroupsClient(client_wrapper=self._client_wrapper) -+ return self._chat_groups - - @property - def chats(self): -@@ -135,17 +134,25 @@ class AsyncEmpathicVoiceClient: - return self._chats - - @property -- def chat_groups(self): -- if self._chat_groups is None: -- from .chat_groups.client import AsyncChatGroupsClient # noqa: E402 -+ def configs(self): -+ if self._configs is None: -+ from .configs.client import AsyncConfigsClient # noqa: E402 - -- self._chat_groups = AsyncChatGroupsClient(client_wrapper=self._client_wrapper) -- return self._chat_groups -+ self._configs = AsyncConfigsClient(client_wrapper=self._client_wrapper) -+ return self._configs - - @property -- def chat(self): -- if self._chat is None: -- from .chat.client import AsyncChatClient # noqa: E402 -+ def prompts(self): -+ if self._prompts is None: -+ from .prompts.client import AsyncPromptsClient # noqa: E402 - -- self._chat = AsyncChatClient(client_wrapper=self._client_wrapper) -- return self._chat -+ self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper) -+ return self._prompts -+ -+ @property -+ def tools(self): -+ if self._tools is None: -+ from .tools.client import AsyncToolsClient # noqa: E402 -+ -+ self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper) -+ return self._tools diff --git a/src/hume/expression_measurement/batch/types/inference_job.py.diff b/src/hume/expression_measurement/batch/types/inference_job.py.diff deleted file mode 100644 index f2e72b13..00000000 --- a/src/hume/expression_measurement/batch/types/inference_job.py.diff +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/hume/expression_measurement/batch/types/inference_job.py b/src/hume/expression_measurement/batch/types/inference_job.py -index 08add412..83a68f84 100644 ---- a/src/hume/expression_measurement/batch/types/inference_job.py -+++ b/src/hume/expression_measurement/batch/types/inference_job.py -@@ -1,7 +1,6 @@ - # This file was auto-generated by Fern from our API Definition. - - import typing --from typing_extensions import deprecated - - import pydantic - from ....core.pydantic_utilities import IS_PYDANTIC_V2 -@@ -16,11 +15,6 @@ class InferenceJob(JobInference): - Jobs created with the Expression Measurement API will have this field set to `INFERENCE`. - """ - -- @property -- @deprecated("Use .state.status instead") -- def status(self) -> str: -- return self.state.status -- - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: diff --git a/src/hume/expression_measurement/client.py.diff b/src/hume/expression_measurement/client.py.diff deleted file mode 100644 index 612621be..00000000 --- a/src/hume/expression_measurement/client.py.diff +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/src/hume/expression_measurement/client.py b/src/hume/expression_measurement/client.py -index f75d9210..a7651e40 100644 ---- a/src/hume/expression_measurement/client.py -+++ b/src/hume/expression_measurement/client.py -@@ -8,16 +8,14 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper - from .raw_client import AsyncRawExpressionMeasurementClient, RawExpressionMeasurementClient - - if typing.TYPE_CHECKING: -- from .batch.client_with_utils import AsyncBatchClientWithUtils, BatchClientWithUtils -- from .stream.stream.client import StreamClient, AsyncStreamClient -+ from .batch.client import AsyncBatchClient, BatchClient - - - class ExpressionMeasurementClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._raw_client = RawExpressionMeasurementClient(client_wrapper=client_wrapper) - self._client_wrapper = client_wrapper -- self._batch: typing.Optional[BatchClientWithUtils] = None -- self._stream: typing.Optional[StreamClient] = None -+ self._batch: typing.Optional[BatchClient] = None - - @property - def with_raw_response(self) -> RawExpressionMeasurementClient: -@@ -33,25 +31,17 @@ class ExpressionMeasurementClient: - @property - def batch(self): - if self._batch is None: -- from .batch.client_with_utils import BatchClientWithUtils # noqa: E402 -+ from .batch.client import BatchClient # noqa: E402 - -- self._batch = BatchClientWithUtils(client_wrapper=self._client_wrapper) -+ self._batch = BatchClient(client_wrapper=self._client_wrapper) - return self._batch - -- @property -- def stream(self): -- if self._stream is None: -- from .stream.stream.client import StreamClient # noqa: E402 -- self._stream = StreamClient(client_wrapper=self._client_wrapper) -- return self._stream -- - - class AsyncExpressionMeasurementClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawExpressionMeasurementClient(client_wrapper=client_wrapper) - self._client_wrapper = client_wrapper -- self._batch: typing.Optional[AsyncBatchClientWithUtils] = None -- self._stream: typing.Optional[AsyncStreamClient] = None -+ self._batch: typing.Optional[AsyncBatchClient] = None - - @property - def with_raw_response(self) -> AsyncRawExpressionMeasurementClient: -@@ -67,15 +57,7 @@ class AsyncExpressionMeasurementClient: - @property - def batch(self): - if self._batch is None: -- from .batch.client_with_utils import AsyncBatchClientWithUtils # noqa: E402 -+ from .batch.client import AsyncBatchClient # noqa: E402 - -- self._batch = AsyncBatchClientWithUtils(client_wrapper=self._client_wrapper) -+ self._batch = AsyncBatchClient(client_wrapper=self._client_wrapper) - return self._batch -- -- @property -- def stream(self): -- if self._stream is None: -- from .stream.stream.client import AsyncStreamClient # noqa: E402 -- -- self._stream = AsyncStreamClient(client_wrapper=self._client_wrapper) -- return self._stream diff --git a/src/hume/expression_measurement/stream/stream/socket_client.py.diff b/src/hume/expression_measurement/stream/stream/socket_client.py.diff deleted file mode 100644 index ac65dfb4..00000000 --- a/src/hume/expression_measurement/stream/stream/socket_client.py.diff +++ /dev/null @@ -1,170 +0,0 @@ -diff --git a/src/hume/expression_measurement/stream/stream/socket_client.py b/src/hume/expression_measurement/stream/stream/socket_client.py -index fcd83929..85935e4e 100644 ---- a/src/hume/expression_measurement/stream/stream/socket_client.py -+++ b/src/hume/expression_measurement/stream/stream/socket_client.py -@@ -1,18 +1,13 @@ - # This file was auto-generated by Fern from our API Definition. - --import base64 - import json - import typing - from json.decoder import JSONDecodeError --from pathlib import Path - - import websockets - import websockets.sync.connection as websockets_sync_connection -- --from ....core.api_error import ApiError - from ....core.events import EventEmitterMixin, EventType - from ....core.pydantic_utilities import parse_obj_as --from .types.config import Config - from .types.stream_models_endpoint_payload import StreamModelsEndpointPayload - from .types.subscribe_event import SubscribeEvent - -@@ -83,74 +78,6 @@ class AsyncStreamSocketClient(EventEmitterMixin): - """ - await self._send(data.dict()) - -- async def send_facemesh( -- self, -- landmarks: typing.List[typing.List[typing.List[float]]], -- config: typing.Optional[Config] = None, -- payload_id: typing.Optional[str] = None, -- ) -> StreamSocketClientResponse: -- landmarks_str = json.dumps(landmarks) -- payload = { -- "data": landmarks_str, -- "models": config.dict() if config else None, -- "raw_text": False, -- "payload_id": payload_id, -- } -- payload = {k: v for k, v in payload.items() if v is not None} -- await self._websocket.send(json.dumps(payload)) -- return await self.recv() -- -- async def send_text( -- self, -- text: str, -- config: typing.Optional[Config] = None, -- payload_id: typing.Optional[str] = None, -- ) -> StreamSocketClientResponse: -- payload = { -- "data": text, -- "models": config.dict() if config else None, -- "raw_text": True, -- "payload_id": payload_id, -- } -- payload = {k: v for k, v in payload.items() if v is not None} -- await self._websocket.send(json.dumps(payload)) -- return await self.recv() -- -- async def send_file( -- self, -- file_: typing.Union[str, Path], -- config: typing.Optional[Config] = None, -- payload_id: typing.Optional[str] = None, -- ) -> StreamSocketClientResponse: -- try: -- with open(file_, "rb") as f: -- bytes_data = base64.b64encode(f.read()).decode() -- except: -- if isinstance(file_, Path): -- raise ApiError(body=f"Failed to open file: {file_}") -- # If you cannot open the file, assume you were passed a b64 string, not a file path -- bytes_data = str(file_) -- -- payload = { -- "data": bytes_data, -- "models": config.dict() if config else None, -- "raw_text": False, -- "payload_id": payload_id, -- } -- payload = {k: v for k, v in payload.items() if v is not None} -- await self._websocket.send(json.dumps(payload)) -- return await self.recv() -- -- async def get_job_details(self) -> StreamSocketClientResponse: -- payload = {"job_details": True} -- await self._websocket.send(json.dumps(payload)) -- return await self.recv() -- -- async def reset(self) -> StreamSocketClientResponse: -- payload = {"reset_stream": True} -- await self._websocket.send(json.dumps(payload)) -- return await self.recv() -- - - class StreamSocketClient(EventEmitterMixin): - def __init__(self, *, websocket: websockets_sync_connection.Connection): -@@ -210,71 +137,3 @@ class StreamSocketClient(EventEmitterMixin): - Send a Pydantic model to the websocket connection. - """ - self._send(data.dict()) -- -- def send_facemesh( -- self, -- landmarks: typing.List[typing.List[typing.List[float]]], -- config: typing.Optional[Config] = None, -- payload_id: typing.Optional[str] = None, -- ) -> StreamSocketClientResponse: -- landmarks_str = json.dumps(landmarks) -- payload = { -- "data": landmarks_str, -- "models": config.dict() if config else None, -- "raw_text": False, -- "payload_id": payload_id, -- } -- payload = {k: v for k, v in payload.items() if v is not None} -- self._websocket.send(json.dumps(payload)) -- return self.recv() -- -- def send_text( -- self, -- text: str, -- config: typing.Optional[Config] = None, -- payload_id: typing.Optional[str] = None, -- ) -> StreamSocketClientResponse: -- payload = { -- "data": text, -- "models": config.dict() if config else None, -- "raw_text": True, -- "payload_id": payload_id, -- } -- payload = {k: v for k, v in payload.items() if v is not None} -- self._websocket.send(json.dumps(payload)) -- return self.recv() -- -- def send_file( -- self, -- file_: typing.Union[str, Path], -- config: typing.Optional[Config] = None, -- payload_id: typing.Optional[str] = None, -- ) -> StreamSocketClientResponse: -- try: -- with open(file_, "rb") as f: -- bytes_data = base64.b64encode(f.read()).decode() -- except: -- if isinstance(file_, Path): -- raise ApiError(body=f"Failed to open file: {file_}") -- # If you cannot open the file, assume you were passed a b64 string, not a file path -- bytes_data = str(file_) -- -- payload = { -- "data": bytes_data, -- "models": config.dict() if config else None, -- "raw_text": False, -- "payload_id": payload_id, -- } -- payload = {k: v for k, v in payload.items() if v is not None} -- self._websocket.send(json.dumps(payload)) -- return self.recv() -- -- def get_job_details(self) -> StreamSocketClientResponse: -- payload = {"job_details": True} -- self._websocket.send(json.dumps(payload)) -- return self.recv() -- -- def reset(self) -> StreamSocketClientResponse: -- payload = {"reset_stream": True} -- self._websocket.send(json.dumps(payload)) -- return self.recv() diff --git a/src/hume/tts/client.py.diff b/src/hume/tts/client.py.diff deleted file mode 100644 index ea61a075..00000000 --- a/src/hume/tts/client.py.diff +++ /dev/null @@ -1,438 +0,0 @@ -diff --git a/src/hume/tts/client.py b/src/hume/tts/client.py -index 5f6c2c70..7c5e8597 100644 ---- a/src/hume/tts/client.py -+++ b/src/hume/tts/client.py -@@ -4,8 +4,7 @@ from __future__ import annotations - - import typing - --from hume.tts.stream_input.client import StreamInputClient -- -+from .. import core - from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper - from ..core.request_options import RequestOptions - from .raw_client import AsyncRawTtsClient, RawTtsClient -@@ -13,13 +12,13 @@ from .types.format import Format - from .types.octave_version import OctaveVersion - from .types.posted_context import PostedContext - from .types.posted_utterance import PostedUtterance -+from .types.posted_utterance_voice import PostedUtteranceVoice - from .types.return_tts import ReturnTts - from .types.timestamp_type import TimestampType - from .types.tts_output import TtsOutput - - if typing.TYPE_CHECKING: - from .voices.client import AsyncVoicesClient, VoicesClient -- from .stream_input.client import AsyncStreamInputClient, StreamInputClient - # this is used as the default value for optional parameters - OMIT = typing.cast(typing.Any, ...) - -@@ -29,7 +28,6 @@ class TtsClient: - self._raw_client = RawTtsClient(client_wrapper=client_wrapper) - self._client_wrapper = client_wrapper - self._voices: typing.Optional[VoicesClient] = None -- self._stream_input: typing.Optional[StreamInputClient] = None - - @property - def with_raw_response(self) -> RawTtsClient: -@@ -75,10 +73,12 @@ class TtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -187,10 +187,12 @@ class TtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -292,10 +294,12 @@ class TtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -397,10 +401,12 @@ class TtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -471,6 +477,117 @@ class TtsClient: - ) as r: - yield from r.data - -+ def convert_voice_file( -+ self, -+ *, -+ audio: core.File, -+ strip_headers: typing.Optional[bool] = OMIT, -+ context: typing.Optional[PostedContext] = OMIT, -+ voice: typing.Optional[PostedUtteranceVoice] = OMIT, -+ format: typing.Optional[Format] = OMIT, -+ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, -+ request_options: typing.Optional[RequestOptions] = None, -+ ) -> typing.Iterator[bytes]: -+ """ -+ Parameters -+ ---------- -+ audio : core.File -+ See core.File for more documentation -+ -+ strip_headers : typing.Optional[bool] -+ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). -+ -+ context : typing.Optional[PostedContext] -+ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. -+ -+ voice : typing.Optional[PostedUtteranceVoice] -+ -+ format : typing.Optional[Format] -+ Specifies the output audio file format. -+ -+ include_timestamp_types : typing.Optional[typing.List[TimestampType]] -+ The set of timestamp types to include in the response. -+ -+ request_options : typing.Optional[RequestOptions] -+ Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. -+ -+ Returns -+ ------- -+ typing.Iterator[bytes] -+ Successful Response -+ """ -+ with self._raw_client.convert_voice_file( -+ audio=audio, -+ strip_headers=strip_headers, -+ context=context, -+ voice=voice, -+ format=format, -+ include_timestamp_types=include_timestamp_types, -+ request_options=request_options, -+ ) as r: -+ yield from r.data -+ -+ def convert_voice_json( -+ self, -+ *, -+ strip_headers: typing.Optional[bool] = OMIT, -+ audio: typing.Optional[core.File] = OMIT, -+ context: typing.Optional[PostedContext] = OMIT, -+ voice: typing.Optional[PostedUtteranceVoice] = OMIT, -+ format: typing.Optional[Format] = OMIT, -+ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, -+ request_options: typing.Optional[RequestOptions] = None, -+ ) -> typing.Iterator[TtsOutput]: -+ """ -+ Parameters -+ ---------- -+ strip_headers : typing.Optional[bool] -+ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). -+ -+ audio : typing.Optional[core.File] -+ See core.File for more documentation -+ -+ context : typing.Optional[PostedContext] -+ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. -+ -+ voice : typing.Optional[PostedUtteranceVoice] -+ -+ format : typing.Optional[Format] -+ Specifies the output audio file format. -+ -+ include_timestamp_types : typing.Optional[typing.List[TimestampType]] -+ The set of timestamp types to include in the response. -+ -+ request_options : typing.Optional[RequestOptions] -+ Request-specific configuration. -+ -+ Yields -+ ------ -+ typing.Iterator[TtsOutput] -+ Successful Response -+ -+ Examples -+ -------- -+ from hume import HumeClient -+ -+ client = HumeClient( -+ api_key="YOUR_API_KEY", -+ ) -+ response = client.tts.convert_voice_json() -+ for chunk in response: -+ yield chunk -+ """ -+ with self._raw_client.convert_voice_json( -+ strip_headers=strip_headers, -+ audio=audio, -+ context=context, -+ voice=voice, -+ format=format, -+ include_timestamp_types=include_timestamp_types, -+ request_options=request_options, -+ ) as r: -+ yield from r.data -+ - @property - def voices(self): - if self._voices is None: -@@ -479,20 +596,12 @@ class TtsClient: - self._voices = VoicesClient(client_wrapper=self._client_wrapper) - return self._voices - -- @property -- def stream_input(self): -- if self._stream_input is None: -- from .stream_input.client import StreamInputClient # noqa: E402 -- self._stream_input = StreamInputClient(client_wrapper=self._client_wrapper) -- return self._stream_input -- - - class AsyncTtsClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._raw_client = AsyncRawTtsClient(client_wrapper=client_wrapper) - self._client_wrapper = client_wrapper - self._voices: typing.Optional[AsyncVoicesClient] = None -- self._stream_input: typing.Optional[AsyncStreamInputClient] = None - - @property - def with_raw_response(self) -> AsyncRawTtsClient: -@@ -538,10 +647,12 @@ class AsyncTtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -658,10 +769,12 @@ class AsyncTtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -772,10 +885,12 @@ class AsyncTtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -886,10 +1001,12 @@ class AsyncTtsClient: - Specifies the output audio file format. - - include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] -- The set of timestamp types to include in the response. -+ The set of timestamp types to include in the response. Only supported for Octave 2 requests. - - num_generations : typing.Optional[int] -- Number of generations of the audio to produce. -+ Number of audio generations to produce from the input utterances. -+ -+ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - - split_utterances : typing.Optional[bool] - Controls how audio output is segmented in the response. -@@ -969,6 +1086,127 @@ class AsyncTtsClient: - async for _chunk in r.data: - yield _chunk - -+ async def convert_voice_file( -+ self, -+ *, -+ audio: core.File, -+ strip_headers: typing.Optional[bool] = OMIT, -+ context: typing.Optional[PostedContext] = OMIT, -+ voice: typing.Optional[PostedUtteranceVoice] = OMIT, -+ format: typing.Optional[Format] = OMIT, -+ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, -+ request_options: typing.Optional[RequestOptions] = None, -+ ) -> typing.AsyncIterator[bytes]: -+ """ -+ Parameters -+ ---------- -+ audio : core.File -+ See core.File for more documentation -+ -+ strip_headers : typing.Optional[bool] -+ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). -+ -+ context : typing.Optional[PostedContext] -+ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. -+ -+ voice : typing.Optional[PostedUtteranceVoice] -+ -+ format : typing.Optional[Format] -+ Specifies the output audio file format. -+ -+ include_timestamp_types : typing.Optional[typing.List[TimestampType]] -+ The set of timestamp types to include in the response. -+ -+ request_options : typing.Optional[RequestOptions] -+ Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. -+ -+ Returns -+ ------- -+ typing.AsyncIterator[bytes] -+ Successful Response -+ """ -+ async with self._raw_client.convert_voice_file( -+ audio=audio, -+ strip_headers=strip_headers, -+ context=context, -+ voice=voice, -+ format=format, -+ include_timestamp_types=include_timestamp_types, -+ request_options=request_options, -+ ) as r: -+ async for _chunk in r.data: -+ yield _chunk -+ -+ async def convert_voice_json( -+ self, -+ *, -+ strip_headers: typing.Optional[bool] = OMIT, -+ audio: typing.Optional[core.File] = OMIT, -+ context: typing.Optional[PostedContext] = OMIT, -+ voice: typing.Optional[PostedUtteranceVoice] = OMIT, -+ format: typing.Optional[Format] = OMIT, -+ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, -+ request_options: typing.Optional[RequestOptions] = None, -+ ) -> typing.AsyncIterator[TtsOutput]: -+ """ -+ Parameters -+ ---------- -+ strip_headers : typing.Optional[bool] -+ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). -+ -+ audio : typing.Optional[core.File] -+ See core.File for more documentation -+ -+ context : typing.Optional[PostedContext] -+ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. -+ -+ voice : typing.Optional[PostedUtteranceVoice] -+ -+ format : typing.Optional[Format] -+ Specifies the output audio file format. -+ -+ include_timestamp_types : typing.Optional[typing.List[TimestampType]] -+ The set of timestamp types to include in the response. -+ -+ request_options : typing.Optional[RequestOptions] -+ Request-specific configuration. -+ -+ Yields -+ ------ -+ typing.AsyncIterator[TtsOutput] -+ Successful Response -+ -+ Examples -+ -------- -+ import asyncio -+ -+ from hume import AsyncHumeClient -+ -+ client = AsyncHumeClient( -+ api_key="YOUR_API_KEY", -+ ) -+ -+ -+ async def main() -> None: -+ response = await client.tts.convert_voice_json() -+ async for chunk in response: -+ yield chunk -+ -+ -+ asyncio.run(main()) -+ """ -+ async with self._raw_client.convert_voice_json( -+ strip_headers=strip_headers, -+ audio=audio, -+ context=context, -+ voice=voice, -+ format=format, -+ include_timestamp_types=include_timestamp_types, -+ request_options=request_options, -+ ) as r: -+ async for _chunk in r.data: -+ yield _chunk -+ - @property - def voices(self): - if self._voices is None: -@@ -976,13 +1214,3 @@ class AsyncTtsClient: - - self._voices = AsyncVoicesClient(client_wrapper=self._client_wrapper) - return self._voices -- -- @property -- def stream_input(self): -- if self._stream_input is None: -- from .stream_input.client import AsyncStreamInputClient -- -- self._stream_input = AsyncStreamInputClient( -- client_wrapper=self._client_wrapper, -- ) -- return self._stream_input