diff --git a/.fern/metadata.json b/.fern/metadata.json index 7799ad6e..c8ef5503 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -16,7 +16,7 @@ "skip_validation": true } }, - "originGitCommit": "335af96251466afae7a9f71badb65c630a48626e", + "originGitCommit": "14c0ca94fcd0279d99570389d7b688dc3a18ea41", "originGitCommitIsDirty": true, "invokedBy": "manual", "sdkVersion": "7.4.1" diff --git a/poetry.lock b/poetry.lock index 534ebf4f..0bd0cd64 100644 --- a/poetry.lock +++ b/poetry.lock @@ -188,14 +188,14 @@ files = [ [[package]] name = "anyio" -version = "4.14.1" +version = "4.14.2" description = "High-level concurrency and networking framework on top of asyncio or Trio" optional = false python-versions = ">=3.10" groups = ["main"] files = [ - {file = "anyio-4.14.1-py3-none-any.whl", hash = "sha256:4e5533c5b8ff0a24f5d7a176cbe6877129cd183893f66b537f8f227d10527d72"}, - {file = "anyio-4.14.1.tar.gz", hash = "sha256:8d648a3544c1a700e3ff78615cd679e4c5c3f149904287e73687b2596963629e"}, + {file = "anyio-4.14.2-py3-none-any.whl", hash = "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494"}, + {file = "anyio-4.14.2.tar.gz", hash = "sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f"}, ] [package.dependencies] @@ -1422,14 +1422,14 @@ files = [ [[package]] name = "types-requests" -version = "2.33.0.20260518" +version = "2.33.0.20260712" description = "Typing stubs for requests" optional = false python-versions = ">=3.10" groups = ["dev"] files = [ - {file = "types_requests-2.33.0.20260518-py3-none-any.whl", hash = "sha256:626d697d1adaaff76e2044dc8c5c051d8f21abc157bdfe204a75558076fe0bf0"}, - {file = "types_requests-2.33.0.20260518.tar.gz", hash = "sha256:df7bd3bfe0ca8402dfb841e7d9be714bb5578203283d66d7dc4ef69343449a5e"}, + {file = "types_requests-2.33.0.20260712-py3-none-any.whl", hash = "sha256:de027e28c171d3da529689cbfa023b0b4eab188c8dfa22fd834eebd2cee6e7bb"}, + {file = "types_requests-2.33.0.20260712.tar.gz", hash = "sha256:2141b67ab534a5c5cd2dac5034f2a35f42e699c5bf185eee608c5246a069d7fb"}, ] [package.dependencies] @@ -1482,73 +1482,121 @@ zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] [[package]] name = "websockets" -version = "16.0" +version = "16.1" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = false python-versions = ">=3.10" groups = ["main"] files = [ - {file = "websockets-16.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:04cdd5d2d1dacbad0a7bf36ccbcd3ccd5a30ee188f2560b7a62a30d14107b31a"}, - {file = "websockets-16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8ff32bb86522a9e5e31439a58addbb0166f0204d64066fb955265c4e214160f0"}, - {file = "websockets-16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:583b7c42688636f930688d712885cf1531326ee05effd982028212ccc13e5957"}, - {file = "websockets-16.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7d837379b647c0c4c2355c2499723f82f1635fd2c26510e1f587d89bc2199e72"}, - {file = "websockets-16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df57afc692e517a85e65b72e165356ed1df12386ecb879ad5693be08fac65dde"}, - {file = "websockets-16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2b9f1e0d69bc60a4a87349d50c09a037a2607918746f07de04df9e43252c77a3"}, - {file = "websockets-16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:335c23addf3d5e6a8633f9f8eda77efad001671e80b95c491dd0924587ece0b3"}, - {file = "websockets-16.0-cp310-cp310-win32.whl", hash = "sha256:37b31c1623c6605e4c00d466c9d633f9b812ea430c11c8a278774a1fde1acfa9"}, - {file = "websockets-16.0-cp310-cp310-win_amd64.whl", hash = "sha256:8e1dab317b6e77424356e11e99a432b7cb2f3ec8c5ab4dabbcee6add48f72b35"}, - {file = "websockets-16.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:31a52addea25187bde0797a97d6fc3d2f92b6f72a9370792d65a6e84615ac8a8"}, - {file = "websockets-16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:417b28978cdccab24f46400586d128366313e8a96312e4b9362a4af504f3bbad"}, - {file = "websockets-16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af80d74d4edfa3cb9ed973a0a5ba2b2a549371f8a741e0800cb07becdd20f23d"}, - {file = "websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:08d7af67b64d29823fed316505a89b86705f2b7981c07848fb5e3ea3020c1abe"}, - {file = "websockets-16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be95cfb0a4dae143eaed2bcba8ac23f4892d8971311f1b06f3c6b78952ee70b"}, - {file = "websockets-16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d6297ce39ce5c2e6feb13c1a996a2ded3b6832155fcfc920265c76f24c7cceb5"}, - {file = "websockets-16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c1b30e4f497b0b354057f3467f56244c603a79c0d1dafce1d16c283c25f6e64"}, - {file = "websockets-16.0-cp311-cp311-win32.whl", hash = "sha256:5f451484aeb5cafee1ccf789b1b66f535409d038c56966d6101740c1614b86c6"}, - {file = "websockets-16.0-cp311-cp311-win_amd64.whl", hash = "sha256:8d7f0659570eefb578dacde98e24fb60af35350193e4f56e11190787bee77dac"}, - {file = "websockets-16.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:71c989cbf3254fbd5e84d3bff31e4da39c43f884e64f2551d14bb3c186230f00"}, - {file = "websockets-16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8b6e209ffee39ff1b6d0fa7bfef6de950c60dfb91b8fcead17da4ee539121a79"}, - {file = "websockets-16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:86890e837d61574c92a97496d590968b23c2ef0aeb8a9bc9421d174cd378ae39"}, - {file = "websockets-16.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9b5aca38b67492ef518a8ab76851862488a478602229112c4b0d58d63a7a4d5c"}, - {file = "websockets-16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e0334872c0a37b606418ac52f6ab9cfd17317ac26365f7f65e203e2d0d0d359f"}, - {file = "websockets-16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a0b31e0b424cc6b5a04b8838bbaec1688834b2383256688cf47eb97412531da1"}, - {file = "websockets-16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:485c49116d0af10ac698623c513c1cc01c9446c058a4e61e3bf6c19dff7335a2"}, - {file = "websockets-16.0-cp312-cp312-win32.whl", hash = "sha256:eaded469f5e5b7294e2bdca0ab06becb6756ea86894a47806456089298813c89"}, - {file = "websockets-16.0-cp312-cp312-win_amd64.whl", hash = "sha256:5569417dc80977fc8c2d43a86f78e0a5a22fee17565d78621b6bb264a115d4ea"}, - {file = "websockets-16.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:878b336ac47938b474c8f982ac2f7266a540adc3fa4ad74ae96fea9823a02cc9"}, - {file = "websockets-16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:52a0fec0e6c8d9a784c2c78276a48a2bdf099e4ccc2a4cad53b27718dbfd0230"}, - {file = "websockets-16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e6578ed5b6981005df1860a56e3617f14a6c307e6a71b4fff8c48fdc50f3ed2c"}, - {file = "websockets-16.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95724e638f0f9c350bb1c2b0a7ad0e83d9cc0c9259f3ea94e40d7b02a2179ae5"}, - {file = "websockets-16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0204dc62a89dc9d50d682412c10b3542d748260d743500a85c13cd1ee4bde82"}, - {file = "websockets-16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:52ac480f44d32970d66763115edea932f1c5b1312de36df06d6b219f6741eed8"}, - {file = "websockets-16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6e5a82b677f8f6f59e8dfc34ec06ca6b5b48bc4fcda346acd093694cc2c24d8f"}, - {file = "websockets-16.0-cp313-cp313-win32.whl", hash = "sha256:abf050a199613f64c886ea10f38b47770a65154dc37181bfaff70c160f45315a"}, - {file = "websockets-16.0-cp313-cp313-win_amd64.whl", hash = "sha256:3425ac5cf448801335d6fdc7ae1eb22072055417a96cc6b31b3861f455fbc156"}, - {file = "websockets-16.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8cc451a50f2aee53042ac52d2d053d08bf89bcb31ae799cb4487587661c038a0"}, - {file = "websockets-16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:daa3b6ff70a9241cf6c7fc9e949d41232d9d7d26fd3522b1ad2b4d62487e9904"}, - {file = "websockets-16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fd3cb4adb94a2a6e2b7c0d8d05cb94e6f1c81a0cf9dc2694fb65c7e8d94c42e4"}, - {file = "websockets-16.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:781caf5e8eee67f663126490c2f96f40906594cb86b408a703630f95550a8c3e"}, - {file = "websockets-16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:caab51a72c51973ca21fa8a18bd8165e1a0183f1ac7066a182ff27107b71e1a4"}, - {file = "websockets-16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:19c4dc84098e523fd63711e563077d39e90ec6702aff4b5d9e344a60cb3c0cb1"}, - {file = "websockets-16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a5e18a238a2b2249c9a9235466b90e96ae4795672598a58772dd806edc7ac6d3"}, - {file = "websockets-16.0-cp314-cp314-win32.whl", hash = "sha256:a069d734c4a043182729edd3e9f247c3b2a4035415a9172fd0f1b71658a320a8"}, - {file = "websockets-16.0-cp314-cp314-win_amd64.whl", hash = "sha256:c0ee0e63f23914732c6d7e0cce24915c48f3f1512ec1d079ed01fc629dab269d"}, - {file = "websockets-16.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:a35539cacc3febb22b8f4d4a99cc79b104226a756aa7400adc722e83b0d03244"}, - {file = "websockets-16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b784ca5de850f4ce93ec85d3269d24d4c82f22b7212023c974c401d4980ebc5e"}, - {file = "websockets-16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:569d01a4e7fba956c5ae4fc988f0d4e187900f5497ce46339c996dbf24f17641"}, - {file = "websockets-16.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:50f23cdd8343b984957e4077839841146f67a3d31ab0d00e6b824e74c5b2f6e8"}, - {file = "websockets-16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:152284a83a00c59b759697b7f9e9cddf4e3c7861dd0d964b472b70f78f89e80e"}, - {file = "websockets-16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bc59589ab64b0022385f429b94697348a6a234e8ce22544e3681b2e9331b5944"}, - {file = "websockets-16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32da954ffa2814258030e5a57bc73a3635463238e797c7375dc8091327434206"}, - {file = "websockets-16.0-cp314-cp314t-win32.whl", hash = "sha256:5a4b4cc550cb665dd8a47f868c8d04c8230f857363ad3c9caf7a0c3bf8c61ca6"}, - {file = "websockets-16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b14dc141ed6d2dde437cddb216004bcac6a1df0935d79656387bd41632ba0bbd"}, - {file = "websockets-16.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:349f83cd6c9a415428ee1005cadb5c2c56f4389bc06a9af16103c3bc3dcc8b7d"}, - {file = "websockets-16.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4a1aba3340a8dca8db6eb5a7986157f52eb9e436b74813764241981ca4888f03"}, - {file = "websockets-16.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f4a32d1bd841d4bcbffdcb3d2ce50c09c3909fbead375ab28d0181af89fd04da"}, - {file = "websockets-16.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0298d07ee155e2e9fda5be8a9042200dd2e3bb0b8a38482156576f863a9d457c"}, - {file = "websockets-16.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:a653aea902e0324b52f1613332ddf50b00c06fdaf7e92624fbf8c77c78fa5767"}, - {file = "websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec"}, - {file = "websockets-16.0.tar.gz", hash = "sha256:5f6261a5e56e8d5c42a4497b364ea24d94d9563e8fbd44e78ac40879c60179b5"}, + {file = "websockets-16.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:de72a9c611178b15557d98eabd3101c9663c4d68938510478a6d162f99afd213"}, + {file = "websockets-16.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:37b0e4d726ffea3776670092d3d13e1cb605076f036a695fd1259de0d9b9fe02"}, + {file = "websockets-16.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:00d50c0a27098fcb7ab47b3d99a1b1159b534dbcd959fbf05113ebc37e5f927b"}, + {file = "websockets-16.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1acb698bff1da1782b31aebd8d7a24d7d05453964abcd7d03dbf6e25893908e8"}, + {file = "websockets-16.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc2c453f3b5f99c56b16e233aad5299860558487d26adb2ed27a00c14ca24b8c"}, + {file = "websockets-16.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1a9f08a0728b0835f1c6abe1d9b746ab3de49b7336a0e1919cf96be1e76273eb"}, + {file = "websockets-16.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a089979d6173b27af18026c8d8b0077f83669a9169174482c4651e9f5739a5b6"}, + {file = "websockets-16.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a3c18dba232ec2b92a68579c9fed8ff5a18f853d1e09fc0b6ca3159e94f689fe"}, + {file = "websockets-16.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6c1eb7df4170d5068892a8834fb5c07b9552353deb0dbeb0bff3820481ae4792"}, + {file = "websockets-16.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c522bd48e625b6d557aa228967258d6d3da031c4cc21d3352fb302479aa9ba0a"}, + {file = "websockets-16.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:d106396927a7f00b0f3a69215c3357f87bf0bca6844247121f7e8291e826a3b1"}, + {file = "websockets-16.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d71bed12909b8039955536e192867d02d76cd3797cedfd0facf822e7668636c3"}, + {file = "websockets-16.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:9c1cf6f9a936b030b5bed0e800c5ee32069338129084546baf5ff5014dc62fa9"}, + {file = "websockets-16.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:3fd3e6a7af2c8fcdcf4ffbeaf7f54a567b91a83267204187797f31faaa2a4efa"}, + {file = "websockets-16.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:dddd27175bf640acae5561fa79b77e8ec71fc445816200523e5c19b6a556fb72"}, + {file = "websockets-16.1-cp310-cp310-win32.whl", hash = "sha256:cce36c80b3f2fede7942f1756d3d885fa6fa086766c8c1bcf00695ab80f0d51a"}, + {file = "websockets-16.1-cp310-cp310-win_amd64.whl", hash = "sha256:115fc4695b94bb855995b23fb1abcb66099a5995575d3d5bc5605a616c58d0eb"}, + {file = "websockets-16.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a9b1d7a63cba8e6b9b77e499a81eab29d31100298d090ad4507d1048c0b9cae0"}, + {file = "websockets-16.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bedbc5efeb96621aa2921d2d92608246691399418cac22acba427eb11877ea1f"}, + {file = "websockets-16.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fd847ab82133015afe65d778e7966ab42dba16bd7ad2e5b8a7918db6539f3f94"}, + {file = "websockets-16.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:e2fb33ccb16ee40a95cc676d7b0ff451a9a2632f11a0dbc2e666326892b2e1de"}, + {file = "websockets-16.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f15b6d9ea9c2eaf6ccab964a082b09bfa6634a495bb0c2e9e7ee6943f58976"}, + {file = "websockets-16.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:638cf57c48b4ad8ac1ff1e453f4f97db2426b690ddc111e6da96b27b4a340bc3"}, + {file = "websockets-16.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2c1c85f61bc9d5eac57ce705d848dc2d2ce3680638300bf4e1da7d749e2cf4ce"}, + {file = "websockets-16.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:eeab6d27f51c7e579023c971f5e6dff200deadf01faf6831beaecd32052dfaef"}, + {file = "websockets-16.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2ed64e5a97b0b97a0b66e18bfe281317a75fbbd5afe692f939ea8d14a4292f2c"}, + {file = "websockets-16.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9b3b021d0ed4bc16eea9775f62c9fa71acdacba0fc790b38581754dedf29ca60"}, + {file = "websockets-16.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:6eb604a4167f0a0d53c2243dfc667a29f0b43c3436057184e070bb82a1000fa2"}, + {file = "websockets-16.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:9a3f125e44c3e34d61d111652e608e0f5b85ce08c225c8d56ad0eb822fa40030"}, + {file = "websockets-16.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:8fdf0b00d0d1f30d1f06a92cab46fe542eec3eb302a7aee7163f142d0780f216"}, + {file = "websockets-16.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:67b56828712f5fa7852de4c0265c28827311a657a4d275b7312ed0d1a918bee4"}, + {file = "websockets-16.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:39c7e7730be33b8f0cd6f0aa8e8c82f9cdd1813f159765e073b2ece65f4824b5"}, + {file = "websockets-16.1-cp311-cp311-win32.whl", hash = "sha256:c54fe94fb2f11e11b48920c5f971e298cec73ac35db56efe57a49db63dfc95d4"}, + {file = "websockets-16.1-cp311-cp311-win_amd64.whl", hash = "sha256:f9f4fb9ae8b802e55609685db98382d48fd3feb1397804e1e774968dea0f28c7"}, + {file = "websockets-16.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b6aa3f7ad345cf3862c21f4fbf2ef5e14d911348476c2845e137c091fe3a3f0b"}, + {file = "websockets-16.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b43fcfb521ac2f34ba80b7b8ea16303e4ad82dd8af667bf40839ad3a5d37b164"}, + {file = "websockets-16.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2bd3e12cd9afbe2baedae0b1eeade8ba64329b60fe2f9abdc966bd10fd2c2ef5"}, + {file = "websockets-16.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:35f41979c8623df9bd30d949d82010a8fda5c56ff12cd8508a5b7272b6d4b53a"}, + {file = "websockets-16.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a24d1f35aef07d794a16c853c688e74956c50239bec37b4f2de080056046419b"}, + {file = "websockets-16.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0c64c024ddf7a35331b21fcddb562a039c275d2c82e8c2d12939e7da23997270"}, + {file = "websockets-16.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c3e99757f5baafe20fc598e202ea6f5b0b265186ad38d0a17bd8beca16296955"}, + {file = "websockets-16.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:353f3bc6e058ac1ccab4b3588e8598837a8c04cfc8351233e6d523be675d844c"}, + {file = "websockets-16.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0352f5b38b40e857b6428d468fa21dbb4dd4a567d933c26d9831b4efe1b92f43"}, + {file = "websockets-16.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:70bd789afab579602968c39f21cb925466505f3edff22f0ae852bca54978a4f9"}, + {file = "websockets-16.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d0fb4b46f121eccd539353baebd1083a8767a9a351109453d1d1caecd1ba40c2"}, + {file = "websockets-16.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c14b6634af01541e4efe2954fd8f263386f7aa6d37c01e55dd8109fd17661452"}, + {file = "websockets-16.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:a58532c49a851bcb481e58c1be23b315c17fe2fbbed509d75aeea12f543d2c15"}, + {file = "websockets-16.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4e969170c3b08e1d8dabd990fef1fa702c4233aeaabec33f871806e444f6a0e4"}, + {file = "websockets-16.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ff9b000064b88787ba9f7a3cb2af2b68a658ca5aad76458a46469e7124b678a0"}, + {file = "websockets-16.1-cp312-cp312-win32.whl", hash = "sha256:b9f5d83f80f4d7c4bba6d97f3755ac05850c784dce0fd2ab371c4e41172f53ff"}, + {file = "websockets-16.1-cp312-cp312-win_amd64.whl", hash = "sha256:6852c9f653966c16109d3b6f31181fd734f7914927e3f0fa1117af7a18c9aa21"}, + {file = "websockets-16.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:b0232ed141cec3df2af5a3959a071c51f40036336b0d37e17faf9ef52fc73e47"}, + {file = "websockets-16.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a71b73d143991714144e159f767b698f03c4a70b8a65ae1733b650cff488045b"}, + {file = "websockets-16.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:187323204c3b2fc465e8fc2609e60437c521790cb9c1acb49c4c452a33e57f37"}, + {file = "websockets-16.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9dba74233c8c3ce368850818c98354dad2570f57231b3fd3bd00d7aa57628881"}, + {file = "websockets-16.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:63339bc8c63c86a463177775cb7c677691f5bcfac7b3b2f01b286d42acd41600"}, + {file = "websockets-16.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:23e545ea8ae4263e37cdfd4e22a217f519e48e432728bc461185bbf585f38a83"}, + {file = "websockets-16.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2237081454846fb40403a80ba86d82e2038b9c45865ab96af0abe7d002a91045"}, + {file = "websockets-16.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5f5218de1ed047385ca53744caba9435d65f75d008364970a3fae95a05812cf9"}, + {file = "websockets-16.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:75c98e3920039d0edff03b74478ada504b7ce3a1bc406db2cabfca84320f7baf"}, + {file = "websockets-16.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1facd189d8190af30487a55b4c3688484dd50801628a3b5b2ccd26db08e67057"}, + {file = "websockets-16.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:cc0c6a6eef613c7da32d4fb068f82ef834b58134f6a16b54e6c1e5bf9529ab3d"}, + {file = "websockets-16.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:ad9411eded8988b879be6038206698bf7106c85a78f642c004485bcb95be17eb"}, + {file = "websockets-16.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:cd68f0914f3b64694895bc5e9b14e8b447e41d7bf5ffaf989bb8dcb5e2dfdce7"}, + {file = "websockets-16.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:fef2debfe7f7ebdda12176f26166f95b7af17af05ba06150fcf889032e0213e9"}, + {file = "websockets-16.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a3cd6c9b798218798f4bb7b2e71c38f0e744bb94ca537b13376f88019d46384d"}, + {file = "websockets-16.1-cp313-cp313-win32.whl", hash = "sha256:84c170c6869633536921e4474b1cce7254c0c9b0053ef5725f966cee47e718e4"}, + {file = "websockets-16.1-cp313-cp313-win_amd64.whl", hash = "sha256:bef52d327d70fa75dad93ee61ea2cb1d1489aca9f35c188833563f5a3b4df0a5"}, + {file = "websockets-16.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:f881fca0a45dd6789939bd6637cd98169b92f1c3fdc78262f2cb9ec2cb1f324e"}, + {file = "websockets-16.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:30c379d5b207d3a7f0ba4c2e4602a895b0bcc63fb5f5371a4ae7fbddb03b672b"}, + {file = "websockets-16.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:98ab58a4faa72b46da0127ccc1931dcbfc0985b0778892300a092185910c4cbe"}, + {file = "websockets-16.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8e9c4e369fc181b2d41a99e01477215cecdc8546a39f7d41a59cc0a7065a0b09"}, + {file = "websockets-16.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0704df094b2d5fa7f6f410925a594c2a5c9a09167731a76292e5410934208209"}, + {file = "websockets-16.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b22b1f4950f6ab7126623329c3b47b3b90a14c05db517f2db2a026ad6c928352"}, + {file = "websockets-16.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1ae4a686a662964a6671069f84f7f908cc3475e782227726b0c622c715962105"}, + {file = "websockets-16.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:856bdd638f8277f86465057bfdd4da097c73058fb0f9d2bd5baea29e2bf2d367"}, + {file = "websockets-16.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9003a1fde1c21a322a3ca3fa0c4bda8c639da81dbc925162766086643b05ba87"}, + {file = "websockets-16.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:39e947b1f5fdab045174306e3916785bf3ed537648acc1549827c08c33b10953"}, + {file = "websockets-16.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:5dd0e666b5931c0509cf65714686a1c5126771e663a79ac5d40da4f58b1f9502"}, + {file = "websockets-16.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:a0285df7925657ad65a65fb8dc330808bce082827538fd50ef45fa12d1fc5bca"}, + {file = "websockets-16.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:82d1c2cab3c133e9d059b3a5420bed9376bd30e21c185c63dda4ddadf6ddda47"}, + {file = "websockets-16.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c39907f1eaf11f6277def65aa02d68f30576b693d0c1ca332aafa3caa723ac6d"}, + {file = "websockets-16.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:45c5ea55446171949eb99fd34b771ceddd511ca21958d40d0197ced33159e5ee"}, + {file = "websockets-16.1-cp314-cp314-win32.whl", hash = "sha256:b8ef8b1c8d6bd029a475ac432e730fba2dfd456715d26c473e2a82291024b99c"}, + {file = "websockets-16.1-cp314-cp314-win_amd64.whl", hash = "sha256:7358ff21632b5d062707f73e859c824f1c3807e73d8ca25e71caca7c4cdcf145"}, + {file = "websockets-16.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:d0f38f4c3e9b359e257c339c2cc1967ccaeedb102e57c1c986bdce4bf4f32268"}, + {file = "websockets-16.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:3c3d2cbd1602593bad49bd86fa3fbb25407d87a3b4bf8857c0ac5ac4914e1901"}, + {file = "websockets-16.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:36069b74671e7e667f48a7484249f84c45a825a134c8b1bdc01875d0daa10d79"}, + {file = "websockets-16.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:587f83c2ce8a5d628e166384d77fa7f0ac69b9007d515ab442123e6615aa8da3"}, + {file = "websockets-16.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a6db7972d52bc1b66cefe2246902e256cbaebc9ba8a45eac09343d7eb6671b2"}, + {file = "websockets-16.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e7d6014888a0632e1ed7a4095248bb3095232999447f2d83bfb1900987dd9ed9"}, + {file = "websockets-16.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9cb074d150e4ad2a77aa8a332c2be85f3f64f2681519d2570c1225c12c9821ff"}, + {file = "websockets-16.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d19c9067e1fe9490f974bffbc0e443b80a7674c5efb4980c429cc00771f07c5a"}, + {file = "websockets-16.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d440ff0c6c7469ad59c0a412c383c235935b43635e89425e3f6a0c36de90c31b"}, + {file = "websockets-16.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8613129a2533f08de24505e69a3e403cedaadae49abdb043c4d170ca71b7e4bd"}, + {file = "websockets-16.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:a5bf9c23f197b4ec88290fd5463f33db67362a1bb10f85fc2e8e7627f0ddab97"}, + {file = "websockets-16.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:520b0fd0395f075febb283c76755af724ab9fd19dffa4f3bfd18cb4e622790a3"}, + {file = "websockets-16.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:7143aa09a67e1c013be44e81a88dfe90fc6244198ab86c7edd064152cf619805"}, + {file = "websockets-16.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:7acb811fad08e611755800d1560e395c67e11a6bd563598ea6abb319afb86938"}, + {file = "websockets-16.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c5cf88e3faa2f7931bc6baeee7599c97656a3f6ac7f831f4fccba233e141783a"}, + {file = "websockets-16.1-cp314-cp314t-win32.whl", hash = "sha256:589f8842521c8307684ce0b40ce4ad70c5e0aa46484c6f1225a94ef4b8970341"}, + {file = "websockets-16.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2c0e0857c30bbbc2bb5c30687508f0b7ec19aa026cd9f2ff8424d0fee42dcc07"}, + {file = "websockets-16.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7289d899c79e763e6221c8dcb8959361cb43274418538d7c7ad16a43b01d12f9"}, + {file = "websockets-16.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:e22e9e3719f5131bd62da4db63c8da63eb8c91cc99e16c1cbd122f130e1ae07a"}, + {file = "websockets-16.1-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:83bdabafef431247e6b11a9aab8a0893fd8e82e1ed95b32e0373625b03ffce4a"}, + {file = "websockets-16.1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0b8d13ceabc5c60995f201b5211d76876e17e68706ebf5d3bc666b32eefff1a6"}, + {file = "websockets-16.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:81495f9c0085361c582efbc3207fb877174cfe03370f17d9cd70624404aa526f"}, + {file = "websockets-16.1-py3-none-any.whl", hash = "sha256:c5149dfe490ec7e5ee5dbf624c642fb725f93a5575c7f00ab594ca9eddb8dd81"}, + {file = "websockets-16.1.tar.gz", hash = "sha256:299468cbe42e2b9981134c7c51d99387d8a7bf562b00183b3eec53f882846dad"}, ] [[package]] diff --git a/src/deepgram/__init__.py b/src/deepgram/__init__.py index 8e0e64c3..ad6c8c5d 100644 --- a/src/deepgram/__init__.py +++ b/src/deepgram/__init__.py @@ -222,9 +222,11 @@ SpeakV1Response, SpeakV1SampleRate, SpeakV1Speed, + SpeakV2AcceptedResponse, SpeakV2Encoding, SpeakV2MipOptOut, SpeakV2Model, + SpeakV2Response, SpeakV2SampleRate, SpeakV2Tag, ThinkSettingsV1, @@ -403,6 +405,7 @@ SpeakSettingsV1Provider_DeepgramParams, SpeakSettingsV1Provider_ElevenLabsParams, SpeakSettingsV1Provider_OpenAiParams, + SpeakV2AcceptedResponseParams, ThinkSettingsV1ContextLengthParams, ThinkSettingsV1EndpointParams, ThinkSettingsV1FunctionsItemEndpointParams, @@ -796,9 +799,12 @@ "SpeakV1Response": ".types", "SpeakV1SampleRate": ".types", "SpeakV1Speed": ".types", + "SpeakV2AcceptedResponse": ".types", + "SpeakV2AcceptedResponseParams": ".requests", "SpeakV2Encoding": ".types", "SpeakV2MipOptOut": ".types", "SpeakV2Model": ".types", + "SpeakV2Response": ".types", "SpeakV2SampleRate": ".types", "SpeakV2Tag": ".types", "ThinkSettingsV1": ".types", @@ -1246,9 +1252,12 @@ def __dir__(): "SpeakV1Response", "SpeakV1SampleRate", "SpeakV1Speed", + "SpeakV2AcceptedResponse", + "SpeakV2AcceptedResponseParams", "SpeakV2Encoding", "SpeakV2MipOptOut", "SpeakV2Model", + "SpeakV2Response", "SpeakV2SampleRate", "SpeakV2Tag", "ThinkSettingsV1", diff --git a/src/deepgram/agent/__init__.py b/src/deepgram/agent/__init__.py index 18f12e7d..410c3fd0 100644 --- a/src/deepgram/agent/__init__.py +++ b/src/deepgram/agent/__init__.py @@ -41,6 +41,8 @@ AgentV1InjectionRefusedParams, AgentV1KeepAlive, AgentV1KeepAliveParams, + AgentV1LatencyReport, + AgentV1LatencyReportParams, AgentV1ListenUpdated, AgentV1ListenUpdatedParams, AgentV1PromptUpdated, @@ -181,6 +183,8 @@ "AgentV1InjectionRefusedParams": ".v1", "AgentV1KeepAlive": ".v1", "AgentV1KeepAliveParams": ".v1", + "AgentV1LatencyReport": ".v1", + "AgentV1LatencyReportParams": ".v1", "AgentV1ListenUpdated": ".v1", "AgentV1ListenUpdatedParams": ".v1", "AgentV1PromptUpdated": ".v1", @@ -345,6 +349,8 @@ def __dir__(): "AgentV1InjectionRefusedParams", "AgentV1KeepAlive", "AgentV1KeepAliveParams", + "AgentV1LatencyReport", + "AgentV1LatencyReportParams", "AgentV1ListenUpdated", "AgentV1ListenUpdatedParams", "AgentV1PromptUpdated", diff --git a/src/deepgram/agent/v1/__init__.py b/src/deepgram/agent/v1/__init__.py index 80bc28fb..e40c7a5e 100644 --- a/src/deepgram/agent/v1/__init__.py +++ b/src/deepgram/agent/v1/__init__.py @@ -25,6 +25,7 @@ AgentV1InjectUserMessage, AgentV1InjectionRefused, AgentV1KeepAlive, + AgentV1LatencyReport, AgentV1ListenUpdated, AgentV1PromptUpdated, AgentV1ReceiveFunctionCallResponse, @@ -98,6 +99,7 @@ AgentV1InjectUserMessageParams, AgentV1InjectionRefusedParams, AgentV1KeepAliveParams, + AgentV1LatencyReportParams, AgentV1ListenUpdatedParams, AgentV1PromptUpdatedParams, AgentV1ReceiveFunctionCallResponseParams, @@ -183,6 +185,8 @@ "AgentV1InjectionRefusedParams": ".requests", "AgentV1KeepAlive": ".types", "AgentV1KeepAliveParams": ".requests", + "AgentV1LatencyReport": ".types", + "AgentV1LatencyReportParams": ".requests", "AgentV1ListenUpdated": ".types", "AgentV1ListenUpdatedParams": ".requests", "AgentV1PromptUpdated": ".types", @@ -347,6 +351,8 @@ def __dir__(): "AgentV1InjectionRefusedParams", "AgentV1KeepAlive", "AgentV1KeepAliveParams", + "AgentV1LatencyReport", + "AgentV1LatencyReportParams", "AgentV1ListenUpdated", "AgentV1ListenUpdatedParams", "AgentV1PromptUpdated", diff --git a/src/deepgram/agent/v1/requests/__init__.py b/src/deepgram/agent/v1/requests/__init__.py index eb841695..82a3d46a 100644 --- a/src/deepgram/agent/v1/requests/__init__.py +++ b/src/deepgram/agent/v1/requests/__init__.py @@ -21,6 +21,7 @@ from .agent_v1inject_user_message import AgentV1InjectUserMessageParams from .agent_v1injection_refused import AgentV1InjectionRefusedParams from .agent_v1keep_alive import AgentV1KeepAliveParams + from .agent_v1latency_report import AgentV1LatencyReportParams from .agent_v1listen_updated import AgentV1ListenUpdatedParams from .agent_v1prompt_updated import AgentV1PromptUpdatedParams from .agent_v1receive_function_call_response import AgentV1ReceiveFunctionCallResponseParams @@ -103,6 +104,7 @@ "AgentV1InjectUserMessageParams": ".agent_v1inject_user_message", "AgentV1InjectionRefusedParams": ".agent_v1injection_refused", "AgentV1KeepAliveParams": ".agent_v1keep_alive", + "AgentV1LatencyReportParams": ".agent_v1latency_report", "AgentV1ListenUpdatedParams": ".agent_v1listen_updated", "AgentV1PromptUpdatedParams": ".agent_v1prompt_updated", "AgentV1ReceiveFunctionCallResponseParams": ".agent_v1receive_function_call_response", @@ -193,6 +195,7 @@ def __dir__(): "AgentV1InjectUserMessageParams", "AgentV1InjectionRefusedParams", "AgentV1KeepAliveParams", + "AgentV1LatencyReportParams", "AgentV1ListenUpdatedParams", "AgentV1PromptUpdatedParams", "AgentV1ReceiveFunctionCallResponseParams", diff --git a/src/deepgram/agent/v1/requests/agent_v1inject_agent_message.py b/src/deepgram/agent/v1/requests/agent_v1inject_agent_message.py index 304cf18b..92a0adb5 100644 --- a/src/deepgram/agent/v1/requests/agent_v1inject_agent_message.py +++ b/src/deepgram/agent/v1/requests/agent_v1inject_agent_message.py @@ -23,4 +23,5 @@ class AgentV1InjectAgentMessageParams(typing_extensions.TypedDict): * `default` — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with `InjectionRefused`. * `queue` — The message is appended after any already-queued `ConversationText` without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately. + * `interrupt` — The agent immediately speaks. If the agent was already speaking, it interrupts the current speech and replaces it with the new message. If the user is speaking, the agent interrupts with the new message, but the user's continued speech triggers `UserStartedSpeaking`, which quickly interrupts the agent. """ diff --git a/src/deepgram/agent/v1/requests/agent_v1latency_report.py b/src/deepgram/agent/v1/requests/agent_v1latency_report.py new file mode 100644 index 00000000..bbbd696d --- /dev/null +++ b/src/deepgram/agent/v1/requests/agent_v1latency_report.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import typing_extensions + + +class AgentV1LatencyReportParams(typing_extensions.TypedDict): + type: typing.Literal["LatencyReport"] + """ + Message type identifier for the latency report + """ + + stt_latency: typing_extensions.NotRequired[float] + """ + Speech-to-text: time from audio received to transcript produced, in seconds + """ + + ttt_token_latency: typing_extensions.NotRequired[float] + """ + Time to first token of any type (text, tool call, or thinking), in seconds + """ + + ttt_text_latency: typing_extensions.NotRequired[float] + """ + Time to first text token from the LLM, in seconds + """ + + ttt_tool_latency: typing_extensions.NotRequired[float] + """ + Time to first tool-call token from the LLM, in seconds + """ + + ttt_thinking_latency: typing_extensions.NotRequired[float] + """ + Time to first thinking token from the LLM, in seconds + """ + + tts_latency: typing_extensions.NotRequired[float] + """ + Text-to-speech: time from first text token to first audio byte, in seconds + """ + + total_latency: typing_extensions.NotRequired[float] + """ + End-to-end: time from user utterance end to first audio byte, in seconds + """ diff --git a/src/deepgram/agent/v1/socket_client.py b/src/deepgram/agent/v1/socket_client.py index cc5437c2..70616b09 100644 --- a/src/deepgram/agent/v1/socket_client.py +++ b/src/deepgram/agent/v1/socket_client.py @@ -18,6 +18,7 @@ from .types.agent_v1inject_user_message import AgentV1InjectUserMessage from .types.agent_v1injection_refused import AgentV1InjectionRefused from .types.agent_v1keep_alive import AgentV1KeepAlive +from .types.agent_v1latency_report import AgentV1LatencyReport from .types.agent_v1listen_updated import AgentV1ListenUpdated from .types.agent_v1prompt_updated import AgentV1PromptUpdated from .types.agent_v1receive_function_call_response import AgentV1ReceiveFunctionCallResponse @@ -73,6 +74,7 @@ def _sanitize_numeric_types(obj: typing.Any) -> typing.Any: AgentV1ConversationText, AgentV1UserStartedSpeaking, AgentV1AgentThinking, + AgentV1LatencyReport, AgentV1FunctionCallRequest, AgentV1AgentStartedSpeaking, AgentV1AgentAudioDone, diff --git a/src/deepgram/agent/v1/types/__init__.py b/src/deepgram/agent/v1/types/__init__.py index 91fdd222..0d00a631 100644 --- a/src/deepgram/agent/v1/types/__init__.py +++ b/src/deepgram/agent/v1/types/__init__.py @@ -24,6 +24,7 @@ from .agent_v1inject_user_message import AgentV1InjectUserMessage from .agent_v1injection_refused import AgentV1InjectionRefused from .agent_v1keep_alive import AgentV1KeepAlive + from .agent_v1latency_report import AgentV1LatencyReport from .agent_v1listen_updated import AgentV1ListenUpdated from .agent_v1prompt_updated import AgentV1PromptUpdated from .agent_v1receive_function_call_response import AgentV1ReceiveFunctionCallResponse @@ -114,6 +115,7 @@ "AgentV1InjectUserMessage": ".agent_v1inject_user_message", "AgentV1InjectionRefused": ".agent_v1injection_refused", "AgentV1KeepAlive": ".agent_v1keep_alive", + "AgentV1LatencyReport": ".agent_v1latency_report", "AgentV1ListenUpdated": ".agent_v1listen_updated", "AgentV1PromptUpdated": ".agent_v1prompt_updated", "AgentV1ReceiveFunctionCallResponse": ".agent_v1receive_function_call_response", @@ -212,6 +214,7 @@ def __dir__(): "AgentV1InjectUserMessage", "AgentV1InjectionRefused", "AgentV1KeepAlive", + "AgentV1LatencyReport", "AgentV1ListenUpdated", "AgentV1PromptUpdated", "AgentV1ReceiveFunctionCallResponse", diff --git a/src/deepgram/agent/v1/types/agent_v1inject_agent_message.py b/src/deepgram/agent/v1/types/agent_v1inject_agent_message.py index a2a1c61d..753f06a9 100644 --- a/src/deepgram/agent/v1/types/agent_v1inject_agent_message.py +++ b/src/deepgram/agent/v1/types/agent_v1inject_agent_message.py @@ -25,6 +25,7 @@ class AgentV1InjectAgentMessage(UncheckedBaseModel): * `default` — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with `InjectionRefused`. * `queue` — The message is appended after any already-queued `ConversationText` without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately. + * `interrupt` — The agent immediately speaks. If the agent was already speaking, it interrupts the current speech and replaces it with the new message. If the user is speaking, the agent interrupts with the new message, but the user's continued speech triggers `UserStartedSpeaking`, which quickly interrupts the agent. """ if IS_PYDANTIC_V2: diff --git a/src/deepgram/agent/v1/types/agent_v1inject_agent_message_behavior.py b/src/deepgram/agent/v1/types/agent_v1inject_agent_message_behavior.py index 9c610dc4..05a31126 100644 --- a/src/deepgram/agent/v1/types/agent_v1inject_agent_message_behavior.py +++ b/src/deepgram/agent/v1/types/agent_v1inject_agent_message_behavior.py @@ -2,4 +2,4 @@ import typing -AgentV1InjectAgentMessageBehavior = typing.Union[typing.Literal["default", "queue"], typing.Any] +AgentV1InjectAgentMessageBehavior = typing.Union[typing.Literal["default", "queue", "interrupt"], typing.Any] diff --git a/src/deepgram/agent/v1/types/agent_v1latency_report.py b/src/deepgram/agent/v1/types/agent_v1latency_report.py new file mode 100644 index 00000000..a20e3f06 --- /dev/null +++ b/src/deepgram/agent/v1/types/agent_v1latency_report.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ....core.pydantic_utilities import IS_PYDANTIC_V2 +from ....core.unchecked_base_model import UncheckedBaseModel + + +class AgentV1LatencyReport(UncheckedBaseModel): + type: typing.Literal["LatencyReport"] = pydantic.Field(default="LatencyReport") + """ + Message type identifier for the latency report + """ + + stt_latency: typing.Optional[float] = pydantic.Field(default=None) + """ + Speech-to-text: time from audio received to transcript produced, in seconds + """ + + ttt_token_latency: typing.Optional[float] = pydantic.Field(default=None) + """ + Time to first token of any type (text, tool call, or thinking), in seconds + """ + + ttt_text_latency: typing.Optional[float] = pydantic.Field(default=None) + """ + Time to first text token from the LLM, in seconds + """ + + ttt_tool_latency: typing.Optional[float] = pydantic.Field(default=None) + """ + Time to first tool-call token from the LLM, in seconds + """ + + ttt_thinking_latency: typing.Optional[float] = pydantic.Field(default=None) + """ + Time to first thinking token from the LLM, in seconds + """ + + tts_latency: typing.Optional[float] = pydantic.Field(default=None) + """ + Text-to-speech: time from first text token to first audio byte, in seconds + """ + + total_latency: typing.Optional[float] = pydantic.Field(default=None) + """ + End-to-end: time from user utterance end to first audio byte, in seconds + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/deepgram/requests/__init__.py b/src/deepgram/requests/__init__.py index c1380c47..c82a9fc2 100644 --- a/src/deepgram/requests/__init__.py +++ b/src/deepgram/requests/__init__.py @@ -195,6 +195,7 @@ SpeakSettingsV1Provider_ElevenLabsParams, SpeakSettingsV1Provider_OpenAiParams, ) + from .speak_v2accepted_response import SpeakV2AcceptedResponseParams from .think_settings_v1 import ThinkSettingsV1Params from .think_settings_v1context_length import ThinkSettingsV1ContextLengthParams from .think_settings_v1endpoint import ThinkSettingsV1EndpointParams @@ -368,6 +369,7 @@ "SpeakSettingsV1Provider_DeepgramParams": ".speak_settings_v1provider", "SpeakSettingsV1Provider_ElevenLabsParams": ".speak_settings_v1provider", "SpeakSettingsV1Provider_OpenAiParams": ".speak_settings_v1provider", + "SpeakV2AcceptedResponseParams": ".speak_v2accepted_response", "ThinkSettingsV1ContextLengthParams": ".think_settings_v1context_length", "ThinkSettingsV1EndpointParams": ".think_settings_v1endpoint", "ThinkSettingsV1FunctionsItemEndpointParams": ".think_settings_v1functions_item_endpoint", @@ -563,6 +565,7 @@ def __dir__(): "SpeakSettingsV1Provider_DeepgramParams", "SpeakSettingsV1Provider_ElevenLabsParams", "SpeakSettingsV1Provider_OpenAiParams", + "SpeakV2AcceptedResponseParams", "ThinkSettingsV1ContextLengthParams", "ThinkSettingsV1EndpointParams", "ThinkSettingsV1FunctionsItemEndpointParams", diff --git a/src/deepgram/requests/speak_v2accepted_response.py b/src/deepgram/requests/speak_v2accepted_response.py new file mode 100644 index 00000000..387f9ffa --- /dev/null +++ b/src/deepgram/requests/speak_v2accepted_response.py @@ -0,0 +1,14 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing_extensions + + +class SpeakV2AcceptedResponseParams(typing_extensions.TypedDict): + """ + Accepted response returned when a callback URL is supplied; the audio is delivered asynchronously to that URL. + """ + + request_id: str + """ + Unique identifier for tracking the asynchronous request + """ diff --git a/src/deepgram/speak/v2/__init__.py b/src/deepgram/speak/v2/__init__.py index 707598c6..fde39ffd 100644 --- a/src/deepgram/speak/v2/__init__.py +++ b/src/deepgram/speak/v2/__init__.py @@ -20,6 +20,8 @@ SpeakV2SpeechStarted, SpeakV2Warning, ) + from . import audio + from .audio import AudioGenerateRequestCallbackMethod, AudioGenerateRequestContainer, AudioGenerateRequestEncoding from .requests import ( SpeakV2CloseParams, SpeakV2ConnectedParams, @@ -34,6 +36,9 @@ SpeakV2WarningParams, ) _dynamic_imports: typing.Dict[str, str] = { + "AudioGenerateRequestCallbackMethod": ".audio", + "AudioGenerateRequestContainer": ".audio", + "AudioGenerateRequestEncoding": ".audio", "SpeakV2Close": ".types", "SpeakV2CloseParams": ".requests", "SpeakV2Connected": ".types", @@ -57,6 +62,7 @@ "SpeakV2SpeechStartedParams": ".requests", "SpeakV2Warning": ".types", "SpeakV2WarningParams": ".requests", + "audio": ".audio", } @@ -82,6 +88,9 @@ def __dir__(): __all__ = [ + "AudioGenerateRequestCallbackMethod", + "AudioGenerateRequestContainer", + "AudioGenerateRequestEncoding", "SpeakV2Close", "SpeakV2CloseParams", "SpeakV2Connected", @@ -105,4 +114,5 @@ def __dir__(): "SpeakV2SpeechStartedParams", "SpeakV2Warning", "SpeakV2WarningParams", + "audio", ] diff --git a/src/deepgram/speak/v2/audio/__init__.py b/src/deepgram/speak/v2/audio/__init__.py new file mode 100644 index 00000000..4b1af3e2 --- /dev/null +++ b/src/deepgram/speak/v2/audio/__init__.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import AudioGenerateRequestCallbackMethod, AudioGenerateRequestContainer, AudioGenerateRequestEncoding +_dynamic_imports: typing.Dict[str, str] = { + "AudioGenerateRequestCallbackMethod": ".types", + "AudioGenerateRequestContainer": ".types", + "AudioGenerateRequestEncoding": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["AudioGenerateRequestCallbackMethod", "AudioGenerateRequestContainer", "AudioGenerateRequestEncoding"] diff --git a/src/deepgram/speak/v2/audio/client.py b/src/deepgram/speak/v2/audio/client.py new file mode 100644 index 00000000..23ada807 --- /dev/null +++ b/src/deepgram/speak/v2/audio/client.py @@ -0,0 +1,234 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ....core.request_options import RequestOptions +from .raw_client import AsyncRawAudioClient, RawAudioClient +from .types.audio_generate_request_callback_method import AudioGenerateRequestCallbackMethod +from .types.audio_generate_request_container import AudioGenerateRequestContainer +from .types.audio_generate_request_encoding import AudioGenerateRequestEncoding + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class AudioClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawAudioClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawAudioClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawAudioClient + """ + return self._raw_client + + def generate( + self, + *, + model: str, + text: str, + callback: typing.Optional[str] = None, + callback_method: typing.Optional[AudioGenerateRequestCallbackMethod] = None, + mip_opt_out: typing.Optional[bool] = None, + tag: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + bit_rate: typing.Optional[int] = None, + container: typing.Optional[AudioGenerateRequestContainer] = None, + encoding: typing.Optional[AudioGenerateRequestEncoding] = None, + sample_rate: typing.Optional[int] = None, + priority: typing.Optional[typing.Literal["low"]] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[bytes]: + """ + Synthesize a complete block of text into a single audio response using Deepgram's Flux TTS batch (REST) API. Use this for pre-rendering fixed audio (IVR prompts, notifications, narration) where the whole text is known up front and you don't need incremental playback or interruption. + + Parameters + ---------- + model : str + Flux TTS model used to synthesize the submitted text, in the form `flux-{voice}-{language}` (for example, `flux-alexis-en`). Required; unlike the v1 (Aura) endpoint there is no default and only flux models are accepted. English-only at launch. The voice catalog is not yet finalized, so this is typed as a free-form string rather than a closed enum; it can be locked to an enum (matching STT Flux `ListenV2Model`) once the GA catalog is confirmed. + + text : str + The text content to be converted to speech. The server normalizes and preprocesses the text (e.g. stripping inline controls) before synthesis. + + callback : typing.Optional[str] + URL to which we'll make the callback request + + callback_method : typing.Optional[AudioGenerateRequestCallbackMethod] + HTTP method by which the callback request will be made + + mip_opt_out : typing.Optional[bool] + Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip + + tag : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Label your requests for the purpose of identification during usage reporting + + bit_rate : typing.Optional[int] + The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. + + container : typing.Optional[AudioGenerateRequestContainer] + Container specifies the file format wrapper for the output audio. The available options depend on the encoding type. + + encoding : typing.Optional[AudioGenerateRequestEncoding] + Encoding allows you to specify the expected encoding of your audio output + + sample_rate : typing.Optional[int] + Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable + + priority : typing.Optional[typing.Literal["low"]] + Processing priority for asynchronous (callback) requests. The only supported value is low. + + 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] + Returns the synthesized audio in the requested encoding as a binary stream. When a `callback` URL is supplied, the request is processed asynchronously and the response body is instead a JSON acknowledgement (Content-Type `application/json`) of the form {"request_id": "..."}, with the audio delivered to the callback URL. Because this endpoint is typed as a binary audio stream, SDK callers that set `callback` receive this JSON acknowledgement through the audio byte iterator as raw bytes and must join the chunks and parse `request_id` themselves. + + Examples + -------- + from deepgram import DeepgramClient + + client = DeepgramClient( + api_key="YOUR_API_KEY", + ) + client.speak.v2.audio.generate( + model="model", + text="text", + ) + """ + with self._raw_client.generate( + model=model, + text=text, + callback=callback, + callback_method=callback_method, + mip_opt_out=mip_opt_out, + tag=tag, + bit_rate=bit_rate, + container=container, + encoding=encoding, + sample_rate=sample_rate, + priority=priority, + request_options=request_options, + ) as r: + yield from r.data + + +class AsyncAudioClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawAudioClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawAudioClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawAudioClient + """ + return self._raw_client + + async def generate( + self, + *, + model: str, + text: str, + callback: typing.Optional[str] = None, + callback_method: typing.Optional[AudioGenerateRequestCallbackMethod] = None, + mip_opt_out: typing.Optional[bool] = None, + tag: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + bit_rate: typing.Optional[int] = None, + container: typing.Optional[AudioGenerateRequestContainer] = None, + encoding: typing.Optional[AudioGenerateRequestEncoding] = None, + sample_rate: typing.Optional[int] = None, + priority: typing.Optional[typing.Literal["low"]] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[bytes]: + """ + Synthesize a complete block of text into a single audio response using Deepgram's Flux TTS batch (REST) API. Use this for pre-rendering fixed audio (IVR prompts, notifications, narration) where the whole text is known up front and you don't need incremental playback or interruption. + + Parameters + ---------- + model : str + Flux TTS model used to synthesize the submitted text, in the form `flux-{voice}-{language}` (for example, `flux-alexis-en`). Required; unlike the v1 (Aura) endpoint there is no default and only flux models are accepted. English-only at launch. The voice catalog is not yet finalized, so this is typed as a free-form string rather than a closed enum; it can be locked to an enum (matching STT Flux `ListenV2Model`) once the GA catalog is confirmed. + + text : str + The text content to be converted to speech. The server normalizes and preprocesses the text (e.g. stripping inline controls) before synthesis. + + callback : typing.Optional[str] + URL to which we'll make the callback request + + callback_method : typing.Optional[AudioGenerateRequestCallbackMethod] + HTTP method by which the callback request will be made + + mip_opt_out : typing.Optional[bool] + Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip + + tag : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Label your requests for the purpose of identification during usage reporting + + bit_rate : typing.Optional[int] + The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. + + container : typing.Optional[AudioGenerateRequestContainer] + Container specifies the file format wrapper for the output audio. The available options depend on the encoding type. + + encoding : typing.Optional[AudioGenerateRequestEncoding] + Encoding allows you to specify the expected encoding of your audio output + + sample_rate : typing.Optional[int] + Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable + + priority : typing.Optional[typing.Literal["low"]] + Processing priority for asynchronous (callback) requests. The only supported value is low. + + 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] + Returns the synthesized audio in the requested encoding as a binary stream. When a `callback` URL is supplied, the request is processed asynchronously and the response body is instead a JSON acknowledgement (Content-Type `application/json`) of the form {"request_id": "..."}, with the audio delivered to the callback URL. Because this endpoint is typed as a binary audio stream, SDK callers that set `callback` receive this JSON acknowledgement through the audio byte iterator as raw bytes and must join the chunks and parse `request_id` themselves. + + Examples + -------- + import asyncio + + from deepgram import AsyncDeepgramClient + + client = AsyncDeepgramClient( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.speak.v2.audio.generate( + model="model", + text="text", + ) + + + asyncio.run(main()) + """ + async with self._raw_client.generate( + model=model, + text=text, + callback=callback, + callback_method=callback_method, + mip_opt_out=mip_opt_out, + tag=tag, + bit_rate=bit_rate, + container=container, + encoding=encoding, + sample_rate=sample_rate, + priority=priority, + request_options=request_options, + ) as r: + async for _chunk in r.data: + yield _chunk diff --git a/src/deepgram/speak/v2/audio/raw_client.py b/src/deepgram/speak/v2/audio/raw_client.py new file mode 100644 index 00000000..bff41145 --- /dev/null +++ b/src/deepgram/speak/v2/audio/raw_client.py @@ -0,0 +1,279 @@ +# This file was auto-generated by Fern from our API Definition. + +import contextlib +import typing +from json.decoder import JSONDecodeError + +from ....core.api_error import ApiError +from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ....core.http_response import AsyncHttpResponse, HttpResponse +from ....core.parse_error import ParsingError +from ....core.request_options import RequestOptions +from ....core.unchecked_base_model import construct_type +from ....errors.bad_request_error import BadRequestError +from .types.audio_generate_request_callback_method import AudioGenerateRequestCallbackMethod +from .types.audio_generate_request_container import AudioGenerateRequestContainer +from .types.audio_generate_request_encoding import AudioGenerateRequestEncoding +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawAudioClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + @contextlib.contextmanager + def generate( + self, + *, + model: str, + text: str, + callback: typing.Optional[str] = None, + callback_method: typing.Optional[AudioGenerateRequestCallbackMethod] = None, + mip_opt_out: typing.Optional[bool] = None, + tag: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + bit_rate: typing.Optional[int] = None, + container: typing.Optional[AudioGenerateRequestContainer] = None, + encoding: typing.Optional[AudioGenerateRequestEncoding] = None, + sample_rate: typing.Optional[int] = None, + priority: typing.Optional[typing.Literal["low"]] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]: + """ + Synthesize a complete block of text into a single audio response using Deepgram's Flux TTS batch (REST) API. Use this for pre-rendering fixed audio (IVR prompts, notifications, narration) where the whole text is known up front and you don't need incremental playback or interruption. + + Parameters + ---------- + model : str + Flux TTS model used to synthesize the submitted text, in the form `flux-{voice}-{language}` (for example, `flux-alexis-en`). Required; unlike the v1 (Aura) endpoint there is no default and only flux models are accepted. English-only at launch. The voice catalog is not yet finalized, so this is typed as a free-form string rather than a closed enum; it can be locked to an enum (matching STT Flux `ListenV2Model`) once the GA catalog is confirmed. + + text : str + The text content to be converted to speech. The server normalizes and preprocesses the text (e.g. stripping inline controls) before synthesis. + + callback : typing.Optional[str] + URL to which we'll make the callback request + + callback_method : typing.Optional[AudioGenerateRequestCallbackMethod] + HTTP method by which the callback request will be made + + mip_opt_out : typing.Optional[bool] + Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip + + tag : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Label your requests for the purpose of identification during usage reporting + + bit_rate : typing.Optional[int] + The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. + + container : typing.Optional[AudioGenerateRequestContainer] + Container specifies the file format wrapper for the output audio. The available options depend on the encoding type. + + encoding : typing.Optional[AudioGenerateRequestEncoding] + Encoding allows you to specify the expected encoding of your audio output + + sample_rate : typing.Optional[int] + Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable + + priority : typing.Optional[typing.Literal["low"]] + Processing priority for asynchronous (callback) requests. The only supported value is low. + + 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[HttpResponse[typing.Iterator[bytes]]] + Returns the synthesized audio in the requested encoding as a binary stream. When a `callback` URL is supplied, the request is processed asynchronously and the response body is instead a JSON acknowledgement (Content-Type `application/json`) of the form {"request_id": "..."}, with the audio delivered to the callback URL. Because this endpoint is typed as a binary audio stream, SDK callers that set `callback` receive this JSON acknowledgement through the audio byte iterator as raw bytes and must join the chunks and parse `request_id` themselves. + """ + with self._client_wrapper.httpx_client.stream( + "v2/speak", + base_url=self._client_wrapper.get_environment().base, + method="POST", + params={ + "callback": callback, + "callback_method": callback_method, + "mip_opt_out": mip_opt_out, + "tag": tag, + "bit_rate": bit_rate, + "container": container, + "encoding": encoding, + "model": model, + "sample_rate": sample_rate, + "priority": priority, + }, + json={ + "text": text, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + def _stream() -> HttpResponse[typing.Iterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None + return HttpResponse( + response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size)) + ) + _response.read() + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, + headers=dict(_response.headers), + body=_response.json(), + cause=e, + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield _stream() + + +class AsyncRawAudioClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + @contextlib.asynccontextmanager + async def generate( + self, + *, + model: str, + text: str, + callback: typing.Optional[str] = None, + callback_method: typing.Optional[AudioGenerateRequestCallbackMethod] = None, + mip_opt_out: typing.Optional[bool] = None, + tag: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None, + bit_rate: typing.Optional[int] = None, + container: typing.Optional[AudioGenerateRequestContainer] = None, + encoding: typing.Optional[AudioGenerateRequestEncoding] = None, + sample_rate: typing.Optional[int] = None, + priority: typing.Optional[typing.Literal["low"]] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]: + """ + Synthesize a complete block of text into a single audio response using Deepgram's Flux TTS batch (REST) API. Use this for pre-rendering fixed audio (IVR prompts, notifications, narration) where the whole text is known up front and you don't need incremental playback or interruption. + + Parameters + ---------- + model : str + Flux TTS model used to synthesize the submitted text, in the form `flux-{voice}-{language}` (for example, `flux-alexis-en`). Required; unlike the v1 (Aura) endpoint there is no default and only flux models are accepted. English-only at launch. The voice catalog is not yet finalized, so this is typed as a free-form string rather than a closed enum; it can be locked to an enum (matching STT Flux `ListenV2Model`) once the GA catalog is confirmed. + + text : str + The text content to be converted to speech. The server normalizes and preprocesses the text (e.g. stripping inline controls) before synthesis. + + callback : typing.Optional[str] + URL to which we'll make the callback request + + callback_method : typing.Optional[AudioGenerateRequestCallbackMethod] + HTTP method by which the callback request will be made + + mip_opt_out : typing.Optional[bool] + Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip + + tag : typing.Optional[typing.Union[str, typing.Sequence[str]]] + Label your requests for the purpose of identification during usage reporting + + bit_rate : typing.Optional[int] + The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. + + container : typing.Optional[AudioGenerateRequestContainer] + Container specifies the file format wrapper for the output audio. The available options depend on the encoding type. + + encoding : typing.Optional[AudioGenerateRequestEncoding] + Encoding allows you to specify the expected encoding of your audio output + + sample_rate : typing.Optional[int] + Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable + + priority : typing.Optional[typing.Literal["low"]] + Processing priority for asynchronous (callback) requests. The only supported value is low. + + 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[AsyncHttpResponse[typing.AsyncIterator[bytes]]] + Returns the synthesized audio in the requested encoding as a binary stream. When a `callback` URL is supplied, the request is processed asynchronously and the response body is instead a JSON acknowledgement (Content-Type `application/json`) of the form {"request_id": "..."}, with the audio delivered to the callback URL. Because this endpoint is typed as a binary audio stream, SDK callers that set `callback` receive this JSON acknowledgement through the audio byte iterator as raw bytes and must join the chunks and parse `request_id` themselves. + """ + async with self._client_wrapper.httpx_client.stream( + "v2/speak", + base_url=self._client_wrapper.get_environment().base, + method="POST", + params={ + "callback": callback, + "callback_method": callback_method, + "mip_opt_out": mip_opt_out, + "tag": tag, + "bit_rate": bit_rate, + "container": container, + "encoding": encoding, + "model": model, + "sample_rate": sample_rate, + "priority": priority, + }, + json={ + "text": text, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) as _response: + + async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]: + try: + if 200 <= _response.status_code < 300: + _chunk_size = request_options.get("chunk_size", None) if request_options is not None else None + return AsyncHttpResponse( + response=_response, + data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)), + ) + await _response.aread() + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + construct_type( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.text + ) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, + headers=dict(_response.headers), + body=_response.json(), + cause=e, + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + yield await _stream() diff --git a/src/deepgram/speak/v2/audio/types/__init__.py b/src/deepgram/speak/v2/audio/types/__init__.py new file mode 100644 index 00000000..b3513560 --- /dev/null +++ b/src/deepgram/speak/v2/audio/types/__init__.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .audio_generate_request_callback_method import AudioGenerateRequestCallbackMethod + from .audio_generate_request_container import AudioGenerateRequestContainer + from .audio_generate_request_encoding import AudioGenerateRequestEncoding +_dynamic_imports: typing.Dict[str, str] = { + "AudioGenerateRequestCallbackMethod": ".audio_generate_request_callback_method", + "AudioGenerateRequestContainer": ".audio_generate_request_container", + "AudioGenerateRequestEncoding": ".audio_generate_request_encoding", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["AudioGenerateRequestCallbackMethod", "AudioGenerateRequestContainer", "AudioGenerateRequestEncoding"] diff --git a/src/deepgram/speak/v2/audio/types/audio_generate_request_callback_method.py b/src/deepgram/speak/v2/audio/types/audio_generate_request_callback_method.py new file mode 100644 index 00000000..7e4dfc2f --- /dev/null +++ b/src/deepgram/speak/v2/audio/types/audio_generate_request_callback_method.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AudioGenerateRequestCallbackMethod = typing.Union[typing.Literal["POST", "PUT"], typing.Any] diff --git a/src/deepgram/speak/v2/audio/types/audio_generate_request_container.py b/src/deepgram/speak/v2/audio/types/audio_generate_request_container.py new file mode 100644 index 00000000..f5339b66 --- /dev/null +++ b/src/deepgram/speak/v2/audio/types/audio_generate_request_container.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AudioGenerateRequestContainer = typing.Union[typing.Literal["none", "wav", "ogg"], typing.Any] diff --git a/src/deepgram/speak/v2/audio/types/audio_generate_request_encoding.py b/src/deepgram/speak/v2/audio/types/audio_generate_request_encoding.py new file mode 100644 index 00000000..c681d457 --- /dev/null +++ b/src/deepgram/speak/v2/audio/types/audio_generate_request_encoding.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AudioGenerateRequestEncoding = typing.Union[ + typing.Literal["linear16", "flac", "mulaw", "alaw", "mp3", "opus", "aac"], typing.Any +] diff --git a/src/deepgram/speak/v2/client.py b/src/deepgram/speak/v2/client.py index ed0c54a7..64aafea5 100644 --- a/src/deepgram/speak/v2/client.py +++ b/src/deepgram/speak/v2/client.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import urllib.parse from contextlib import asynccontextmanager, contextmanager @@ -20,6 +22,9 @@ from .raw_client import AsyncRawV2Client, RawV2Client from .socket_client import AsyncV2SocketClient, V2SocketClient +if typing.TYPE_CHECKING: + from .audio.client import AsyncAudioClient, AudioClient + try: from websockets.legacy.client import connect as websockets_client_connect # type: ignore except ImportError: @@ -29,6 +34,8 @@ class V2Client: def __init__(self, *, client_wrapper: SyncClientWrapper): self._raw_client = RawV2Client(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AudioClient] = None @property def with_raw_response(self) -> RawV2Client: @@ -125,10 +132,20 @@ def connect( body="Unexpected error when initializing websocket connection.", ) + @property + def audio(self): + if self._audio is None: + from .audio.client import AudioClient # noqa: E402 + + self._audio = AudioClient(client_wrapper=self._client_wrapper) + return self._audio + class AsyncV2Client: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._raw_client = AsyncRawV2Client(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._audio: typing.Optional[AsyncAudioClient] = None @property def with_raw_response(self) -> AsyncRawV2Client: @@ -224,3 +241,11 @@ async def connect( headers=dict(headers), body="Unexpected error when initializing websocket connection.", ) + + @property + def audio(self): + if self._audio is None: + from .audio.client import AsyncAudioClient # noqa: E402 + + self._audio = AsyncAudioClient(client_wrapper=self._client_wrapper) + return self._audio diff --git a/src/deepgram/types/__init__.py b/src/deepgram/types/__init__.py index eda099b1..21850dc9 100644 --- a/src/deepgram/types/__init__.py +++ b/src/deepgram/types/__init__.py @@ -257,9 +257,11 @@ from .speak_v1response import SpeakV1Response from .speak_v1sample_rate import SpeakV1SampleRate from .speak_v1speed import SpeakV1Speed + from .speak_v2accepted_response import SpeakV2AcceptedResponse from .speak_v2encoding import SpeakV2Encoding from .speak_v2mip_opt_out import SpeakV2MipOptOut from .speak_v2model import SpeakV2Model + from .speak_v2response import SpeakV2Response from .speak_v2sample_rate import SpeakV2SampleRate from .speak_v2tag import SpeakV2Tag from .think_settings_v1 import ThinkSettingsV1 @@ -501,9 +503,11 @@ "SpeakV1Response": ".speak_v1response", "SpeakV1SampleRate": ".speak_v1sample_rate", "SpeakV1Speed": ".speak_v1speed", + "SpeakV2AcceptedResponse": ".speak_v2accepted_response", "SpeakV2Encoding": ".speak_v2encoding", "SpeakV2MipOptOut": ".speak_v2mip_opt_out", "SpeakV2Model": ".speak_v2model", + "SpeakV2Response": ".speak_v2response", "SpeakV2SampleRate": ".speak_v2sample_rate", "SpeakV2Tag": ".speak_v2tag", "ThinkSettingsV1": ".think_settings_v1", @@ -767,9 +771,11 @@ def __dir__(): "SpeakV1Response", "SpeakV1SampleRate", "SpeakV1Speed", + "SpeakV2AcceptedResponse", "SpeakV2Encoding", "SpeakV2MipOptOut", "SpeakV2Model", + "SpeakV2Response", "SpeakV2SampleRate", "SpeakV2Tag", "ThinkSettingsV1", diff --git a/src/deepgram/types/speak_v2accepted_response.py b/src/deepgram/types/speak_v2accepted_response.py new file mode 100644 index 00000000..48a33a2b --- /dev/null +++ b/src/deepgram/types/speak_v2accepted_response.py @@ -0,0 +1,27 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SpeakV2AcceptedResponse(UncheckedBaseModel): + """ + Accepted response returned when a callback URL is supplied; the audio is delivered asynchronously to that URL. + """ + + request_id: str = pydantic.Field() + """ + Unique identifier for tracking the asynchronous request + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/deepgram/types/speak_v2response.py b/src/deepgram/types/speak_v2response.py new file mode 100644 index 00000000..281f7e4a --- /dev/null +++ b/src/deepgram/types/speak_v2response.py @@ -0,0 +1,3 @@ +# This file was auto-generated by Fern from our API Definition. + +SpeakV2Response = bytes diff --git a/tests/wire/test_speak_v2_audio.py b/tests/wire/test_speak_v2_audio.py new file mode 100644 index 00000000..551f6360 --- /dev/null +++ b/tests/wire/test_speak_v2_audio.py @@ -0,0 +1,13 @@ +from .conftest import get_client, verify_request_count + + +def test_speak_v2_audio_generate() -> None: + """Test generate endpoint with WireMock""" + test_id = "speak.v2.audio.generate.0" + client = get_client(test_id) + for _ in client.speak.v2.audio.generate( + model="model", + text="text", + ): + pass + verify_request_count(test_id, "POST", "/v2/speak", {"model": "model"}, 1) diff --git a/wiremock/wiremock-mappings.json b/wiremock/wiremock-mappings.json index 4b3fec7e..67ae5cc3 100644 --- a/wiremock/wiremock-mappings.json +++ b/wiremock/wiremock-mappings.json @@ -1944,6 +1944,42 @@ } } }, + { + "id": "03be31ca-f645-45f5-80a1-a0b4fb7de41a", + "name": "Flux Text to Speech (batch) - default", + "request": { + "urlPathTemplate": "/v2/speak", + "method": "POST", + "headers": { + "Authorization": { + "matches": ".+" + } + }, + "queryParameters": { + "model": { + "equalTo": "model" + } + } + }, + "response": { + "status": 200, + "body": "{\n \"key\": \"value\"\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "03be31ca-f645-45f5-80a1-a0b4fb7de41a", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "61883f62-09ec-4be9-b477-13a89b9677cf", "name": "List Agent Configurations - default", @@ -2324,6 +2360,6 @@ } ], "meta": { - "total": 49 + "total": 50 } } \ No newline at end of file