diff --git a/src/vocametrix/_generated/__init__.py b/src/vocametrix/_generated/__init__.py index 883dd64..dafc615 100644 --- a/src/vocametrix/_generated/__init__.py +++ b/src/vocametrix/_generated/__init__.py @@ -1,6 +1,6 @@ # Auto-generated — do not edit. Run `python tasks.py regenerate` to update. -"""A client library for accessing Vocametrix API""" +""" A client library for accessing Vocametrix API """ from .client import AuthenticatedClient, Client __all__ = ( diff --git a/src/vocametrix/_generated/api/advanced_voice_analysis/get_calculate_csid.py b/src/vocametrix/_generated/api/advanced_voice_analysis/get_calculate_csid.py new file mode 100644 index 0000000..045a5af --- /dev/null +++ b/src/vocametrix/_generated/api/advanced_voice_analysis/get_calculate_csid.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_calculate_csid_response_200 import GetCalculateCsidResponse200 +from ...types import UNSET, Response + + +def _get_kwargs( + *, + cs_file_id: str, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["csFileId"] = cs_file_id + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/api/calculate-csid", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | GetCalculateCsidResponse200 | None: + if response.status_code == 200: + response_200 = GetCalculateCsidResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 429: + response_429 = cast(Any, None) + return response_429 + + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | GetCalculateCsidResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + cs_file_id: str, +) -> Response[Any | GetCalculateCsidResponse200]: + """Calculate the Cepstral Spectral Index of Dysphonia (CSID) from a connected speech recording pre- + uploaded via POST /ap… + + Args: + cs_file_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | GetCalculateCsidResponse200] + """ + + kwargs = _get_kwargs( + cs_file_id=cs_file_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + cs_file_id: str, +) -> Any | GetCalculateCsidResponse200 | None: + """Calculate the Cepstral Spectral Index of Dysphonia (CSID) from a connected speech recording pre- + uploaded via POST /ap… + + Args: + cs_file_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | GetCalculateCsidResponse200 + """ + + return sync_detailed( + client=client, + cs_file_id=cs_file_id, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + cs_file_id: str, +) -> Response[Any | GetCalculateCsidResponse200]: + """Calculate the Cepstral Spectral Index of Dysphonia (CSID) from a connected speech recording pre- + uploaded via POST /ap… + + Args: + cs_file_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | GetCalculateCsidResponse200] + """ + + kwargs = _get_kwargs( + cs_file_id=cs_file_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + cs_file_id: str, +) -> Any | GetCalculateCsidResponse200 | None: + """Calculate the Cepstral Spectral Index of Dysphonia (CSID) from a connected speech recording pre- + uploaded via POST /ap… + + Args: + cs_file_id (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | GetCalculateCsidResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + cs_file_id=cs_file_id, + ) + ).parsed diff --git a/src/vocametrix/_generated/api/advanced_voice_analysis/post_estimate_formants.py b/src/vocametrix/_generated/api/advanced_voice_analysis/post_estimate_formants.py new file mode 100644 index 0000000..f8d6444 --- /dev/null +++ b/src/vocametrix/_generated/api/advanced_voice_analysis/post_estimate_formants.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_estimate_formants_body import PostEstimateFormantsBody +from ...models.post_estimate_formants_response_200 import PostEstimateFormantsResponse200 +from ...types import Response + + +def _get_kwargs( + *, + body: PostEstimateFormantsBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/api/estimate_formants", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | PostEstimateFormantsResponse200 | None: + if response.status_code == 200: + response_200 = PostEstimateFormantsResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 429: + response_429 = cast(Any, None) + return response_429 + + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | PostEstimateFormantsResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: PostEstimateFormantsBody, +) -> Response[Any | PostEstimateFormantsResponse200]: + """Estimate F1-F3 quickly, with the vowel position on the IPA chart, from a file pre-uploaded via POST + /api/assignFileId… + + Args: + body (PostEstimateFormantsBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostEstimateFormantsResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: PostEstimateFormantsBody, +) -> Any | PostEstimateFormantsResponse200 | None: + """Estimate F1-F3 quickly, with the vowel position on the IPA chart, from a file pre-uploaded via POST + /api/assignFileId… + + Args: + body (PostEstimateFormantsBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostEstimateFormantsResponse200 + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: PostEstimateFormantsBody, +) -> Response[Any | PostEstimateFormantsResponse200]: + """Estimate F1-F3 quickly, with the vowel position on the IPA chart, from a file pre-uploaded via POST + /api/assignFileId… + + Args: + body (PostEstimateFormantsBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostEstimateFormantsResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: PostEstimateFormantsBody, +) -> Any | PostEstimateFormantsResponse200 | None: + """Estimate F1-F3 quickly, with the vowel position on the IPA chart, from a file pre-uploaded via POST + /api/assignFileId… + + Args: + body (PostEstimateFormantsBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostEstimateFormantsResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/vocametrix/_generated/api/advanced_voice_analysis/post_voice_assessment.py b/src/vocametrix/_generated/api/advanced_voice_analysis/post_voice_assessment.py new file mode 100644 index 0000000..209cc22 --- /dev/null +++ b/src/vocametrix/_generated/api/advanced_voice_analysis/post_voice_assessment.py @@ -0,0 +1,178 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_voice_assessment_body import PostVoiceAssessmentBody +from ...models.post_voice_assessment_response_200 import PostVoiceAssessmentResponse200 +from ...types import Response + + +def _get_kwargs( + *, + body: PostVoiceAssessmentBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/api/voice-assessment", + } + + _kwargs["files"] = body.to_multipart() + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | PostVoiceAssessmentResponse200 | None: + if response.status_code == 200: + response_200 = PostVoiceAssessmentResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 429: + response_429 = cast(Any, None) + return response_429 + + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | PostVoiceAssessmentResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: PostVoiceAssessmentBody, +) -> Response[Any | PostVoiceAssessmentResponse200]: + """Run the full voice assessment in one call. Send the recordings as multipart/form-data: at least one + of 'vowel' (susta… + + Args: + body (PostVoiceAssessmentBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostVoiceAssessmentResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: PostVoiceAssessmentBody, +) -> Any | PostVoiceAssessmentResponse200 | None: + """Run the full voice assessment in one call. Send the recordings as multipart/form-data: at least one + of 'vowel' (susta… + + Args: + body (PostVoiceAssessmentBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostVoiceAssessmentResponse200 + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: PostVoiceAssessmentBody, +) -> Response[Any | PostVoiceAssessmentResponse200]: + """Run the full voice assessment in one call. Send the recordings as multipart/form-data: at least one + of 'vowel' (susta… + + Args: + body (PostVoiceAssessmentBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostVoiceAssessmentResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: PostVoiceAssessmentBody, +) -> Any | PostVoiceAssessmentResponse200 | None: + """Run the full voice assessment in one call. Send the recordings as multipart/form-data: at least one + of 'vowel' (susta… + + Args: + body (PostVoiceAssessmentBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostVoiceAssessmentResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_fricative.py b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_fricative.py new file mode 100644 index 0000000..00d5a3c --- /dev/null +++ b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_fricative.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_classify_french_fricative_body import PostClassifyFrenchFricativeBody +from ...models.post_classify_french_fricative_response_200 import ( + PostClassifyFrenchFricativeResponse200, +) +from ...types import Response + + +def _get_kwargs( + *, + body: PostClassifyFrenchFricativeBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/api/classify-french-fricative", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | PostClassifyFrenchFricativeResponse200 | None: + if response.status_code == 200: + response_200 = PostClassifyFrenchFricativeResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 429: + response_429 = cast(Any, None) + return response_429 + + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | PostClassifyFrenchFricativeResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchFricativeBody, +) -> Response[Any | PostClassifyFrenchFricativeResponse200]: + """Synchronous classifier for an isolated French fricative recording (6 classes: f, s, v, z, ʃ, ʒ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchFricativeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchFricativeResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchFricativeBody, +) -> Any | PostClassifyFrenchFricativeResponse200 | None: + """Synchronous classifier for an isolated French fricative recording (6 classes: f, s, v, z, ʃ, ʒ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchFricativeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchFricativeResponse200 + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchFricativeBody, +) -> Response[Any | PostClassifyFrenchFricativeResponse200]: + """Synchronous classifier for an isolated French fricative recording (6 classes: f, s, v, z, ʃ, ʒ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchFricativeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchFricativeResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchFricativeBody, +) -> Any | PostClassifyFrenchFricativeResponse200 | None: + """Synchronous classifier for an isolated French fricative recording (6 classes: f, s, v, z, ʃ, ʒ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchFricativeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchFricativeResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_liquid_nasal.py b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_liquid_nasal.py new file mode 100644 index 0000000..2adc67e --- /dev/null +++ b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_liquid_nasal.py @@ -0,0 +1,182 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_classify_french_liquid_nasal_body import PostClassifyFrenchLiquidNasalBody +from ...models.post_classify_french_liquid_nasal_response_200 import ( + PostClassifyFrenchLiquidNasalResponse200, +) +from ...types import Response + + +def _get_kwargs( + *, + body: PostClassifyFrenchLiquidNasalBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/api/classify-french-liquid-nasal", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | PostClassifyFrenchLiquidNasalResponse200 | None: + if response.status_code == 200: + response_200 = PostClassifyFrenchLiquidNasalResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 429: + response_429 = cast(Any, None) + return response_429 + + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | PostClassifyFrenchLiquidNasalResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchLiquidNasalBody, +) -> Response[Any | PostClassifyFrenchLiquidNasalResponse200]: + """Synchronous classifier for an isolated French liquid/nasal recording (5 classes: l, m, n, ɲ, ʁ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchLiquidNasalBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchLiquidNasalResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchLiquidNasalBody, +) -> Any | PostClassifyFrenchLiquidNasalResponse200 | None: + """Synchronous classifier for an isolated French liquid/nasal recording (5 classes: l, m, n, ɲ, ʁ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchLiquidNasalBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchLiquidNasalResponse200 + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchLiquidNasalBody, +) -> Response[Any | PostClassifyFrenchLiquidNasalResponse200]: + """Synchronous classifier for an isolated French liquid/nasal recording (5 classes: l, m, n, ɲ, ʁ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchLiquidNasalBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchLiquidNasalResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchLiquidNasalBody, +) -> Any | PostClassifyFrenchLiquidNasalResponse200 | None: + """Synchronous classifier for an isolated French liquid/nasal recording (5 classes: l, m, n, ɲ, ʁ), + built for the Aphasi… + + Args: + body (PostClassifyFrenchLiquidNasalBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchLiquidNasalResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_plosive.py b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_plosive.py new file mode 100644 index 0000000..3e7f35e --- /dev/null +++ b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_plosive.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_classify_french_plosive_body import PostClassifyFrenchPlosiveBody +from ...models.post_classify_french_plosive_response_200 import PostClassifyFrenchPlosiveResponse200 +from ...types import Response + + +def _get_kwargs( + *, + body: PostClassifyFrenchPlosiveBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/api/classify-french-plosive", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | PostClassifyFrenchPlosiveResponse200 | None: + if response.status_code == 200: + response_200 = PostClassifyFrenchPlosiveResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 429: + response_429 = cast(Any, None) + return response_429 + + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | PostClassifyFrenchPlosiveResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchPlosiveBody, +) -> Response[Any | PostClassifyFrenchPlosiveResponse200]: + """Synchronous classifier for an isolated French plosive recording (6 classes: b, d, k, p, t, ɡ), built + for the Aphasix … + + Args: + body (PostClassifyFrenchPlosiveBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchPlosiveResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchPlosiveBody, +) -> Any | PostClassifyFrenchPlosiveResponse200 | None: + """Synchronous classifier for an isolated French plosive recording (6 classes: b, d, k, p, t, ɡ), built + for the Aphasix … + + Args: + body (PostClassifyFrenchPlosiveBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchPlosiveResponse200 + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchPlosiveBody, +) -> Response[Any | PostClassifyFrenchPlosiveResponse200]: + """Synchronous classifier for an isolated French plosive recording (6 classes: b, d, k, p, t, ɡ), built + for the Aphasix … + + Args: + body (PostClassifyFrenchPlosiveBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchPlosiveResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchPlosiveBody, +) -> Any | PostClassifyFrenchPlosiveResponse200 | None: + """Synchronous classifier for an isolated French plosive recording (6 classes: b, d, k, p, t, ɡ), built + for the Aphasix … + + Args: + body (PostClassifyFrenchPlosiveBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchPlosiveResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_vowel.py b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_vowel.py new file mode 100644 index 0000000..5dc8d58 --- /dev/null +++ b/src/vocametrix/_generated/api/phoneme_classification/post_classify_french_vowel.py @@ -0,0 +1,180 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.post_classify_french_vowel_body import PostClassifyFrenchVowelBody +from ...models.post_classify_french_vowel_response_200 import PostClassifyFrenchVowelResponse200 +from ...types import Response + + +def _get_kwargs( + *, + body: PostClassifyFrenchVowelBody, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/api/classify-french-vowel", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | PostClassifyFrenchVowelResponse200 | None: + if response.status_code == 200: + response_200 = PostClassifyFrenchVowelResponse200.from_dict(response.json()) + + return response_200 + + if response.status_code == 400: + response_400 = cast(Any, None) + return response_400 + + if response.status_code == 401: + response_401 = cast(Any, None) + return response_401 + + if response.status_code == 429: + response_429 = cast(Any, None) + return response_429 + + if response.status_code == 500: + response_500 = cast(Any, None) + return response_500 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | PostClassifyFrenchVowelResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchVowelBody, +) -> Response[Any | PostClassifyFrenchVowelResponse200]: + """Synchronous classifier for an isolated French vowel recording (11 classes: a, e, i, o, u, y, ø, ɑ̃, + ɔ̃, ɛ, ɛ̃), built… + + Args: + body (PostClassifyFrenchVowelBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchVowelResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchVowelBody, +) -> Any | PostClassifyFrenchVowelResponse200 | None: + """Synchronous classifier for an isolated French vowel recording (11 classes: a, e, i, o, u, y, ø, ɑ̃, + ɔ̃, ɛ, ɛ̃), built… + + Args: + body (PostClassifyFrenchVowelBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchVowelResponse200 + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchVowelBody, +) -> Response[Any | PostClassifyFrenchVowelResponse200]: + """Synchronous classifier for an isolated French vowel recording (11 classes: a, e, i, o, u, y, ø, ɑ̃, + ɔ̃, ɛ, ɛ̃), built… + + Args: + body (PostClassifyFrenchVowelBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | PostClassifyFrenchVowelResponse200] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: PostClassifyFrenchVowelBody, +) -> Any | PostClassifyFrenchVowelResponse200 | None: + """Synchronous classifier for an isolated French vowel recording (11 classes: a, e, i, o, u, y, ø, ɑ̃, + ɔ̃, ɛ, ɛ̃), built… + + Args: + body (PostClassifyFrenchVowelBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | PostClassifyFrenchVowelResponse200 + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/vocametrix/_generated/models/__init__.py b/src/vocametrix/_generated/models/__init__.py index 4c7fcd4..7e9c8e2 100644 --- a/src/vocametrix/_generated/models/__init__.py +++ b/src/vocametrix/_generated/models/__init__.py @@ -5,6 +5,7 @@ from .get_calculate_ambitus_response_200 import GetCalculateAmbitusResponse200 from .get_calculate_avqi_response_200 import GetCalculateAvqiResponse200 from .get_calculate_cpp_response_200 import GetCalculateCppResponse200 +from .get_calculate_csid_response_200 import GetCalculateCsidResponse200 from .get_calculate_dsi_response_200 import GetCalculateDsiResponse200 from .get_calculate_formant_statistics_gender import GetCalculateFormantStatisticsGender from .get_calculate_formant_statistics_response_200 import GetCalculateFormantStatisticsResponse200 @@ -42,12 +43,50 @@ ) from .post_analyze_phonemes_live_body import PostAnalyzePhonemesLiveBody from .post_analyze_phonemes_live_response_200 import PostAnalyzePhonemesLiveResponse200 +from .post_analyze_phonemes_live_response_200_phoneme_timings_item import ( + PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem, +) +from .post_analyze_phonemes_live_response_200_phonemes_item import ( + PostAnalyzePhonemesLiveResponse200PhonemesItem, +) from .post_assign_file_id_body import PostAssignFileIdBody from .post_assign_file_id_response_200 import PostAssignFileIdResponse200 from .post_classify_estonian_vowel_body import PostClassifyEstonianVowelBody from .post_classify_estonian_vowel_response_200 import PostClassifyEstonianVowelResponse200 +from .post_classify_french_fricative_body import PostClassifyFrenchFricativeBody +from .post_classify_french_fricative_response_200 import PostClassifyFrenchFricativeResponse200 +from .post_classify_french_fricative_response_200_all_probabilities import ( + PostClassifyFrenchFricativeResponse200AllProbabilities, +) +from .post_classify_french_liquid_nasal_body import PostClassifyFrenchLiquidNasalBody +from .post_classify_french_liquid_nasal_response_200 import PostClassifyFrenchLiquidNasalResponse200 +from .post_classify_french_liquid_nasal_response_200_all_probabilities import ( + PostClassifyFrenchLiquidNasalResponse200AllProbabilities, +) +from .post_classify_french_plosive_body import PostClassifyFrenchPlosiveBody +from .post_classify_french_plosive_response_200 import PostClassifyFrenchPlosiveResponse200 +from .post_classify_french_plosive_response_200_all_probabilities import ( + PostClassifyFrenchPlosiveResponse200AllProbabilities, +) +from .post_classify_french_vowel_body import PostClassifyFrenchVowelBody +from .post_classify_french_vowel_response_200 import PostClassifyFrenchVowelResponse200 +from .post_classify_french_vowel_response_200_all_probabilities import ( + PostClassifyFrenchVowelResponse200AllProbabilities, +) from .post_classify_stuttering_body import PostClassifyStutteringBody from .post_classify_stuttering_response_200 import PostClassifyStutteringResponse200 +from .post_estimate_formants_body import PostEstimateFormantsBody +from .post_estimate_formants_response_200 import PostEstimateFormantsResponse200 +from .post_estimate_formants_response_200_formants import PostEstimateFormantsResponse200Formants +from .post_estimate_formants_response_200_ipa_coordinates import ( + PostEstimateFormantsResponse200IpaCoordinates, +) +from .post_estimate_formants_response_200_speaker_info import ( + PostEstimateFormantsResponse200SpeakerInfo, +) +from .post_estimate_formants_response_200_suggestions_item import ( + PostEstimateFormantsResponse200SuggestionsItem, +) from .post_french_to_ipa_agent_body import PostFrenchToIpaAgentBody from .post_french_to_ipa_agent_body_phonetic_input_item import ( PostFrenchToIpaAgentBodyPhoneticInputItem, @@ -137,6 +176,15 @@ from .post_vocabulary_tutor_agent_response_200_metadata import ( PostVocabularyTutorAgentResponse200Metadata, ) +from .post_voice_assessment_body import PostVoiceAssessmentBody +from .post_voice_assessment_response_200 import PostVoiceAssessmentResponse200 +from .post_voice_assessment_response_200_audio import PostVoiceAssessmentResponse200Audio +from .post_voice_assessment_response_200_details import PostVoiceAssessmentResponse200Details +from .post_voice_assessment_response_200_errors import PostVoiceAssessmentResponse200Errors +from .post_voice_assessment_response_200_summary import PostVoiceAssessmentResponse200Summary +from .post_voice_assessment_response_200_warnings_item import ( + PostVoiceAssessmentResponse200WarningsItem, +) from .post_voice_metrics_interpreter_body import PostVoiceMetricsInterpreterBody from .post_voice_metrics_interpreter_body_metrics import PostVoiceMetricsInterpreterBodyMetrics from .post_voice_metrics_interpreter_body_praat_results import ( @@ -165,6 +213,7 @@ "GetCalculateAmbitusResponse200", "GetCalculateAvqiResponse200", "GetCalculateCppResponse200", + "GetCalculateCsidResponse200", "GetCalculateDsiResponse200", "GetCalculateFormantStatisticsGender", "GetCalculateFormantStatisticsResponse200", @@ -192,12 +241,32 @@ "PostAdaptiveExerciseAgentResponse200Metadata", "PostAnalyzePhonemesLiveBody", "PostAnalyzePhonemesLiveResponse200", + "PostAnalyzePhonemesLiveResponse200PhonemesItem", + "PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem", "PostAssignFileIdBody", "PostAssignFileIdResponse200", "PostClassifyEstonianVowelBody", "PostClassifyEstonianVowelResponse200", + "PostClassifyFrenchFricativeBody", + "PostClassifyFrenchFricativeResponse200", + "PostClassifyFrenchFricativeResponse200AllProbabilities", + "PostClassifyFrenchLiquidNasalBody", + "PostClassifyFrenchLiquidNasalResponse200", + "PostClassifyFrenchLiquidNasalResponse200AllProbabilities", + "PostClassifyFrenchPlosiveBody", + "PostClassifyFrenchPlosiveResponse200", + "PostClassifyFrenchPlosiveResponse200AllProbabilities", + "PostClassifyFrenchVowelBody", + "PostClassifyFrenchVowelResponse200", + "PostClassifyFrenchVowelResponse200AllProbabilities", "PostClassifyStutteringBody", "PostClassifyStutteringResponse200", + "PostEstimateFormantsBody", + "PostEstimateFormantsResponse200", + "PostEstimateFormantsResponse200Formants", + "PostEstimateFormantsResponse200IpaCoordinates", + "PostEstimateFormantsResponse200SpeakerInfo", + "PostEstimateFormantsResponse200SuggestionsItem", "PostFrenchToIpaAgentBody", "PostFrenchToIpaAgentBodyPhoneticInputItem", "PostFrenchToIpaAgentResponse200", @@ -251,6 +320,13 @@ "PostVocabularyTutorAgentBody", "PostVocabularyTutorAgentResponse200", "PostVocabularyTutorAgentResponse200Metadata", + "PostVoiceAssessmentBody", + "PostVoiceAssessmentResponse200", + "PostVoiceAssessmentResponse200Audio", + "PostVoiceAssessmentResponse200Details", + "PostVoiceAssessmentResponse200Errors", + "PostVoiceAssessmentResponse200Summary", + "PostVoiceAssessmentResponse200WarningsItem", "PostVoiceMetricsInterpreterBody", "PostVoiceMetricsInterpreterBodyMetrics", "PostVoiceMetricsInterpreterBodyPraatResults", diff --git a/src/vocametrix/_generated/models/get_calculate_csid_response_200.py b/src/vocametrix/_generated/models/get_calculate_csid_response_200.py new file mode 100644 index 0000000..3622f60 --- /dev/null +++ b/src/vocametrix/_generated/models/get_calculate_csid_response_200.py @@ -0,0 +1,143 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GetCalculateCsidResponse200") + + +@_attrs_define +class GetCalculateCsidResponse200: + """ + Attributes: + csid_score (float | Unset): number - CSID score (154.59 − 10.393·CPP − 1.083·SR − 3.713·SR_SD). + cpp (float | Unset): number - Smoothed cepstral peak prominence over the whole signal, in dB. + sr (float | Unset): number - Low/high spectral ratio (energy below 4 kHz vs 4–8 kHz), in dB, averaged over + voiced frames. + sr_sd (float | Unset): number - Standard deviation of the spectral ratio across voiced frames, in dB. + n_voiced_frames (int | Unset): integer - Number of voiced frames used. + cutoff_screening (float | Unset): number - Screening cut-off (19.09). + cutoff_balanced (float | Unset): number - Balanced cut-off (24.27). + cutoff_conservative (float | Unset): number - Conservative cut-off (30.85). + csid_reference (str | Unset): Bibliographic reference of the formula (Awan et al.). + csid_caveat (str | Unset): Note on the per-frame approximation used by this implementation. + """ + + csid_score: float | Unset = UNSET + cpp: float | Unset = UNSET + sr: float | Unset = UNSET + sr_sd: float | Unset = UNSET + n_voiced_frames: int | Unset = UNSET + cutoff_screening: float | Unset = UNSET + cutoff_balanced: float | Unset = UNSET + cutoff_conservative: float | Unset = UNSET + csid_reference: str | Unset = UNSET + csid_caveat: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + csid_score = self.csid_score + + cpp = self.cpp + + sr = self.sr + + sr_sd = self.sr_sd + + n_voiced_frames = self.n_voiced_frames + + cutoff_screening = self.cutoff_screening + + cutoff_balanced = self.cutoff_balanced + + cutoff_conservative = self.cutoff_conservative + + csid_reference = self.csid_reference + + csid_caveat = self.csid_caveat + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if csid_score is not UNSET: + field_dict["CSID_SCORE"] = csid_score + if cpp is not UNSET: + field_dict["CPP"] = cpp + if sr is not UNSET: + field_dict["SR"] = sr + if sr_sd is not UNSET: + field_dict["SR_SD"] = sr_sd + if n_voiced_frames is not UNSET: + field_dict["N_VOICED_FRAMES"] = n_voiced_frames + if cutoff_screening is not UNSET: + field_dict["CUTOFF_SCREENING"] = cutoff_screening + if cutoff_balanced is not UNSET: + field_dict["CUTOFF_BALANCED"] = cutoff_balanced + if cutoff_conservative is not UNSET: + field_dict["CUTOFF_CONSERVATIVE"] = cutoff_conservative + if csid_reference is not UNSET: + field_dict["CSID_REFERENCE"] = csid_reference + if csid_caveat is not UNSET: + field_dict["CSID_CAVEAT"] = csid_caveat + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + csid_score = d.pop("CSID_SCORE", UNSET) + + cpp = d.pop("CPP", UNSET) + + sr = d.pop("SR", UNSET) + + sr_sd = d.pop("SR_SD", UNSET) + + n_voiced_frames = d.pop("N_VOICED_FRAMES", UNSET) + + cutoff_screening = d.pop("CUTOFF_SCREENING", UNSET) + + cutoff_balanced = d.pop("CUTOFF_BALANCED", UNSET) + + cutoff_conservative = d.pop("CUTOFF_CONSERVATIVE", UNSET) + + csid_reference = d.pop("CSID_REFERENCE", UNSET) + + csid_caveat = d.pop("CSID_CAVEAT", UNSET) + + get_calculate_csid_response_200 = cls( + csid_score=csid_score, + cpp=cpp, + sr=sr, + sr_sd=sr_sd, + n_voiced_frames=n_voiced_frames, + cutoff_screening=cutoff_screening, + cutoff_balanced=cutoff_balanced, + cutoff_conservative=cutoff_conservative, + csid_reference=csid_reference, + csid_caveat=csid_caveat, + ) + + get_calculate_csid_response_200.additional_properties = d + return get_calculate_csid_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/get_calculate_spectral_advanced_response_200.py b/src/vocametrix/_generated/models/get_calculate_spectral_advanced_response_200.py index f8752d1..aa5b404 100644 --- a/src/vocametrix/_generated/models/get_calculate_spectral_advanced_response_200.py +++ b/src/vocametrix/_generated/models/get_calculate_spectral_advanced_response_200.py @@ -27,6 +27,8 @@ class GetCalculateSpectralAdvancedResponse200: spectral_flux (float | Unset): Rate of spectral change in Hz. Example: 234.6 ltas_slope (float | Unset): Spectral slope 0-1 kHz vs 1-4 kHz in dB/octave. Example: -12.4 ltas_tilt (float | Unset): Trend line slope across 1-4 kHz in dB/octave. Example: -8.9 + ltas_curve (float | Unset): Full Long-Term Average Spectrum as freq/dB pairs, 80-4000 Hz in 100 Hz steps. + Example: [{"freq":80,"db":-25.3}, ...] mean_f0 (float | Unset): Mean fundamental frequency in Hz. Example: 195.8 f1_mean (float | Unset): Mean first formant frequency in Hz. Example: 685.4 f2_mean (float | Unset): Mean second formant frequency in Hz. Example: 1247.8 @@ -61,6 +63,7 @@ class GetCalculateSpectralAdvancedResponse200: spectral_flux: float | Unset = UNSET ltas_slope: float | Unset = UNSET ltas_tilt: float | Unset = UNSET + ltas_curve: float | Unset = UNSET mean_f0: float | Unset = UNSET f1_mean: float | Unset = UNSET f2_mean: float | Unset = UNSET @@ -107,6 +110,8 @@ def to_dict(self) -> dict[str, Any]: ltas_tilt = self.ltas_tilt + ltas_curve = self.ltas_curve + mean_f0 = self.mean_f0 f1_mean = self.f1_mean @@ -172,6 +177,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["LTAS_SLOPE"] = ltas_slope if ltas_tilt is not UNSET: field_dict["LTAS_TILT"] = ltas_tilt + if ltas_curve is not UNSET: + field_dict["LTAS_CURVE"] = ltas_curve if mean_f0 is not UNSET: field_dict["MEAN_F0"] = mean_f0 if f1_mean is not UNSET: @@ -240,6 +247,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ltas_tilt = d.pop("LTAS_TILT", UNSET) + ltas_curve = d.pop("LTAS_CURVE", UNSET) + mean_f0 = d.pop("MEAN_F0", UNSET) f1_mean = d.pop("F1_MEAN", UNSET) @@ -291,6 +300,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: spectral_flux=spectral_flux, ltas_slope=ltas_slope, ltas_tilt=ltas_tilt, + ltas_curve=ltas_curve, mean_f0=mean_f0, f1_mean=f1_mean, f2_mean=f2_mean, diff --git a/src/vocametrix/_generated/models/post_adaptive_exercise_agent_body.py b/src/vocametrix/_generated/models/post_adaptive_exercise_agent_body.py index af05c10..7e84349 100644 --- a/src/vocametrix/_generated/models/post_adaptive_exercise_agent_body.py +++ b/src/vocametrix/_generated/models/post_adaptive_exercise_agent_body.py @@ -20,7 +20,7 @@ class PostAdaptiveExerciseAgentBody: insensitive). Other values return 400 with a `validProfiles` field. include_tips (str | Unset): Optional, default false. If true, the agent includes practitioner tips alongside the adapted exercise. - email (str | Unset): Optional. Used by anonymous-key validation flow. + email (str | Unset): Optional. Used by the credit-validation flow. """ exercise_text: str diff --git a/src/vocametrix/_generated/models/post_adaptive_exercise_agent_response_200.py b/src/vocametrix/_generated/models/post_adaptive_exercise_agent_response_200.py index b887475..59bd0ea 100644 --- a/src/vocametrix/_generated/models/post_adaptive_exercise_agent_response_200.py +++ b/src/vocametrix/_generated/models/post_adaptive_exercise_agent_response_200.py @@ -26,14 +26,12 @@ class PostAdaptiveExerciseAgentResponse200: metadata (PostAdaptiveExerciseAgentResponse200Metadata | Unset): Object: { profile, includeTips, threadId, agentName, processingTimeSeconds, timestamp }. remaining_credits (float | Unset): Number. - is_anonymous_session (bool | Unset): Boolean. """ success: bool | Unset = UNSET adapted_html: str | Unset = UNSET metadata: PostAdaptiveExerciseAgentResponse200Metadata | Unset = UNSET remaining_credits: float | Unset = UNSET - is_anonymous_session: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -47,8 +45,6 @@ def to_dict(self) -> dict[str, Any]: remaining_credits = self.remaining_credits - is_anonymous_session = self.is_anonymous_session - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -60,8 +56,6 @@ def to_dict(self) -> dict[str, Any]: field_dict["metadata"] = metadata if remaining_credits is not UNSET: field_dict["remaining_credits"] = remaining_credits - if is_anonymous_session is not UNSET: - field_dict["isAnonymousSession"] = is_anonymous_session return field_dict @@ -85,14 +79,11 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: remaining_credits = d.pop("remaining_credits", UNSET) - is_anonymous_session = d.pop("isAnonymousSession", UNSET) - post_adaptive_exercise_agent_response_200 = cls( success=success, adapted_html=adapted_html, metadata=metadata, remaining_credits=remaining_credits, - is_anonymous_session=is_anonymous_session, ) post_adaptive_exercise_agent_response_200.additional_properties = d diff --git a/src/vocametrix/_generated/models/post_analyze_phonemes_live_body.py b/src/vocametrix/_generated/models/post_analyze_phonemes_live_body.py index 94d3d1f..1fb67a1 100644 --- a/src/vocametrix/_generated/models/post_analyze_phonemes_live_body.py +++ b/src/vocametrix/_generated/models/post_analyze_phonemes_live_body.py @@ -22,8 +22,10 @@ class PostAnalyzePhonemesLiveBody: reference_word (str | Unset): Optional. Currently accepted by the API but not used by the JavaScript layer (passed through to the Python script which may use it). language (str | Unset): Optional, default "fr-FR". Accepted: "fr-FR" | "et-EE". - model (str | Unset): Optional. Alias for an alternative ASR model (must pass server-side `isKnownAlias`). - Resolved to a model URL internally. + model (str | Unset): Optional, French only. `short-words-champion` (isolated short words, recommended), + `logatome-champion` (logatomes / nonsense syllables), or omit for the CNAM wav2vec2-french-phonemizer-v2 + baseline (continuous speech). Must be a known alias (server-side `isKnownAlias`) — an unknown alias returns 400. + Resolved to a model blob URL internally, never exposed to the client. keep_blob (str | Unset): Optional, default false. If false and `blobUrl` was used, the source blob is deleted after success (only when hosted on the Vocametrix storage account). """ diff --git a/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200.py b/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200.py index bc91aec..db04a11 100644 --- a/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200.py +++ b/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200.py @@ -1,13 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +if TYPE_CHECKING: + from ..models.post_analyze_phonemes_live_response_200_phoneme_timings_item import ( + PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem, + ) + from ..models.post_analyze_phonemes_live_response_200_phonemes_item import ( + PostAnalyzePhonemesLiveResponse200PhonemesItem, + ) + + T = TypeVar("T", bound="PostAnalyzePhonemesLiveResponse200") @@ -15,33 +24,144 @@ class PostAnalyzePhonemesLiveResponse200: """ Attributes: - python_output (str | Unset): JSON shape produced by the underlying phoneme client. Typical fields: `phonemes: [{ - label, start_ms, end_ms, confidence }, ...]`, `language`, `model_used`. Exact shape is not enumerated by the JS - layer and is determined by the per-language Python client (see python/phonemes/french/phoneme_client.py and - python/phonemes/estonian/phoneme_client.py). + success (bool | Unset): Boolean — true when analysis completed (including the empty-result "Silence detected" + case). + status (str | Unset): "completed" on success. + message (str | Unset): Descriptive message, e.g. "Analysis completed successfully" or "Silence detected". + language (str | Unset): Echoed language code processed. + transcription (str | Unset): Space-separated sequence of detected phonemes (empty string if silence). + phoneme_count (float | Unset): Total number of phonemes detected. + phonemes (list[PostAnalyzePhonemesLiveResponse200PhonemesItem] | Unset): Array of the phoneme labels detected, + in order. + phoneme_timings (list[PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem] | Unset): Array of `{ phoneme, + start, end, duration, confidence, second_phoneme, second_confidence }` — one entry per phoneme. + `second_phoneme`/`second_confidence` (French champion models only) is the runner-up at that phoneme's most + confident frame, or null if unavailable. + audio_info (str | Unset): `{ duration_seconds, sample_rate }` — sample_rate is always 16000. """ - python_output: str | Unset = UNSET + success: bool | Unset = UNSET + status: str | Unset = UNSET + message: str | Unset = UNSET + language: str | Unset = UNSET + transcription: str | Unset = UNSET + phoneme_count: float | Unset = UNSET + phonemes: list[PostAnalyzePhonemesLiveResponse200PhonemesItem] | Unset = UNSET + phoneme_timings: list[PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem] | Unset = UNSET + audio_info: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - python_output = self.python_output + success = self.success + + status = self.status + + message = self.message + + language = self.language + + transcription = self.transcription + + phoneme_count = self.phoneme_count + + phonemes: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.phonemes, Unset): + phonemes = [] + for phonemes_item_data in self.phonemes: + phonemes_item = phonemes_item_data.to_dict() + phonemes.append(phonemes_item) + + phoneme_timings: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.phoneme_timings, Unset): + phoneme_timings = [] + for phoneme_timings_item_data in self.phoneme_timings: + phoneme_timings_item = phoneme_timings_item_data.to_dict() + phoneme_timings.append(phoneme_timings_item) + + audio_info = self.audio_info field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if python_output is not UNSET: - field_dict[""] = python_output + if success is not UNSET: + field_dict["success"] = success + if status is not UNSET: + field_dict["status"] = status + if message is not UNSET: + field_dict["message"] = message + if language is not UNSET: + field_dict["language"] = language + if transcription is not UNSET: + field_dict["transcription"] = transcription + if phoneme_count is not UNSET: + field_dict["phoneme_count"] = phoneme_count + if phonemes is not UNSET: + field_dict["phonemes"] = phonemes + if phoneme_timings is not UNSET: + field_dict["phoneme_timings"] = phoneme_timings + if audio_info is not UNSET: + field_dict["audio_info"] = audio_info return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.post_analyze_phonemes_live_response_200_phoneme_timings_item import ( + PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem, + ) + from ..models.post_analyze_phonemes_live_response_200_phonemes_item import ( + PostAnalyzePhonemesLiveResponse200PhonemesItem, + ) + d = dict(src_dict) - python_output = d.pop("", UNSET) + success = d.pop("success", UNSET) + + status = d.pop("status", UNSET) + + message = d.pop("message", UNSET) + + language = d.pop("language", UNSET) + + transcription = d.pop("transcription", UNSET) + + phoneme_count = d.pop("phoneme_count", UNSET) + + _phonemes = d.pop("phonemes", UNSET) + phonemes: list[PostAnalyzePhonemesLiveResponse200PhonemesItem] | Unset = UNSET + if _phonemes is not UNSET: + phonemes = [] + for phonemes_item_data in _phonemes: + phonemes_item = PostAnalyzePhonemesLiveResponse200PhonemesItem.from_dict( + phonemes_item_data + ) + + phonemes.append(phonemes_item) + + _phoneme_timings = d.pop("phoneme_timings", UNSET) + phoneme_timings: list[PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem] | Unset = UNSET + if _phoneme_timings is not UNSET: + phoneme_timings = [] + for phoneme_timings_item_data in _phoneme_timings: + phoneme_timings_item = ( + PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem.from_dict( + phoneme_timings_item_data + ) + ) + + phoneme_timings.append(phoneme_timings_item) + + audio_info = d.pop("audio_info", UNSET) post_analyze_phonemes_live_response_200 = cls( - python_output=python_output, + success=success, + status=status, + message=message, + language=language, + transcription=transcription, + phoneme_count=phoneme_count, + phonemes=phonemes, + phoneme_timings=phoneme_timings, + audio_info=audio_info, ) post_analyze_phonemes_live_response_200.additional_properties = d diff --git a/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200_phoneme_timings_item.py b/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200_phoneme_timings_item.py new file mode 100644 index 0000000..09755e1 --- /dev/null +++ b/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200_phoneme_timings_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem") + + +@_attrs_define +class PostAnalyzePhonemesLiveResponse200PhonemeTimingsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_analyze_phonemes_live_response_200_phoneme_timings_item = cls() + + post_analyze_phonemes_live_response_200_phoneme_timings_item.additional_properties = d + return post_analyze_phonemes_live_response_200_phoneme_timings_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200_phonemes_item.py b/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200_phonemes_item.py new file mode 100644 index 0000000..d06d4ba --- /dev/null +++ b/src/vocametrix/_generated/models/post_analyze_phonemes_live_response_200_phonemes_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostAnalyzePhonemesLiveResponse200PhonemesItem") + + +@_attrs_define +class PostAnalyzePhonemesLiveResponse200PhonemesItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_analyze_phonemes_live_response_200_phonemes_item = cls() + + post_analyze_phonemes_live_response_200_phonemes_item.additional_properties = d + return post_analyze_phonemes_live_response_200_phonemes_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_fricative_body.py b/src/vocametrix/_generated/models/post_classify_french_fricative_body.py new file mode 100644 index 0000000..978a878 --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_fricative_body.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PostClassifyFrenchFricativeBody") + + +@_attrs_define +class PostClassifyFrenchFricativeBody: + """ + Attributes: + audio (str): Mode 1 (use ONE of audio/blobUrl/fileId). Direct audio file upload, multipart/form-data — the field + name MUST be exactly `audio`. + blob_url (str): Mode 2 (use ONE of audio/blobUrl/fileId), JSON body. HTTPS URL of the audio file, downloaded + server-side. + file_id (str): Mode 3 (use ONE of audio/blobUrl/fileId), JSON body. fileId from a prior /api/assignFileId + upload. + expected_fricative (str | Unset): Optional (also accepted as expectedFricative, any input mode). When provided, + the response is scored against this fricative. + """ + + audio: str + blob_url: str + file_id: str + expected_fricative: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + audio = self.audio + + blob_url = self.blob_url + + file_id = self.file_id + + expected_fricative = self.expected_fricative + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "audio": audio, + "blobUrl": blob_url, + "fileId": file_id, + } + ) + if expected_fricative is not UNSET: + field_dict["expected_fricative"] = expected_fricative + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + audio = d.pop("audio") + + blob_url = d.pop("blobUrl") + + file_id = d.pop("fileId") + + expected_fricative = d.pop("expected_fricative", UNSET) + + post_classify_french_fricative_body = cls( + audio=audio, + blob_url=blob_url, + file_id=file_id, + expected_fricative=expected_fricative, + ) + + post_classify_french_fricative_body.additional_properties = d + return post_classify_french_fricative_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_fricative_response_200.py b/src/vocametrix/_generated/models/post_classify_french_fricative_response_200.py new file mode 100644 index 0000000..c0c6c9d --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_fricative_response_200.py @@ -0,0 +1,177 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.post_classify_french_fricative_response_200_all_probabilities import ( + PostClassifyFrenchFricativeResponse200AllProbabilities, + ) + + +T = TypeVar("T", bound="PostClassifyFrenchFricativeResponse200") + + +@_attrs_define +class PostClassifyFrenchFricativeResponse200: + """ + Attributes: + success (bool | Unset): Boolean — true if the classification succeeded. + predicted_fricative (str | Unset): Predicted fricative (IPA). + confidence (str | Unset): Confidence for the predicted fricative (0.0 - 1.0). + all_probabilities (PostClassifyFrenchFricativeResponse200AllProbabilities | Unset): Object of probabilities for + all 6 fricatives. + audio_duration (float | Unset): Audio duration in seconds. + processing_time_seconds (float | Unset): Server-side processing time in seconds. + model_name (str | Unset): Model used, e.g. "fricative-aphasix-champion". + expected_fricative_conditional (str | Unset): Echoed back only when expected_fricative/expectedFricative was + provided in the request. + is_correct_conditional (bool | Unset): Boolean — true when predicted_fricative matches expected_fricative. + expected_fricative_probability_conditional (str | Unset): The model's probability for expected_fricative, from + all_probabilities. + score_conditional (int | Unset): expected_fricative_probability rounded to a 0-100 integer. + """ + + success: bool | Unset = UNSET + predicted_fricative: str | Unset = UNSET + confidence: str | Unset = UNSET + all_probabilities: PostClassifyFrenchFricativeResponse200AllProbabilities | Unset = UNSET + audio_duration: float | Unset = UNSET + processing_time_seconds: float | Unset = UNSET + model_name: str | Unset = UNSET + expected_fricative_conditional: str | Unset = UNSET + is_correct_conditional: bool | Unset = UNSET + expected_fricative_probability_conditional: str | Unset = UNSET + score_conditional: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + success = self.success + + predicted_fricative = self.predicted_fricative + + confidence = self.confidence + + all_probabilities: dict[str, Any] | Unset = UNSET + if not isinstance(self.all_probabilities, Unset): + all_probabilities = self.all_probabilities.to_dict() + + audio_duration = self.audio_duration + + processing_time_seconds = self.processing_time_seconds + + model_name = self.model_name + + expected_fricative_conditional = self.expected_fricative_conditional + + is_correct_conditional = self.is_correct_conditional + + expected_fricative_probability_conditional = self.expected_fricative_probability_conditional + + score_conditional = self.score_conditional + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if success is not UNSET: + field_dict["success"] = success + if predicted_fricative is not UNSET: + field_dict["predicted_fricative"] = predicted_fricative + if confidence is not UNSET: + field_dict["confidence"] = confidence + if all_probabilities is not UNSET: + field_dict["all_probabilities"] = all_probabilities + if audio_duration is not UNSET: + field_dict["audio_duration"] = audio_duration + if processing_time_seconds is not UNSET: + field_dict["processing_time_seconds"] = processing_time_seconds + if model_name is not UNSET: + field_dict["model_name"] = model_name + if expected_fricative_conditional is not UNSET: + field_dict["expected_fricative (conditional)"] = expected_fricative_conditional + if is_correct_conditional is not UNSET: + field_dict["is_correct (conditional)"] = is_correct_conditional + if expected_fricative_probability_conditional is not UNSET: + field_dict["expected_fricative_probability (conditional)"] = ( + expected_fricative_probability_conditional + ) + if score_conditional is not UNSET: + field_dict["score (conditional)"] = score_conditional + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.post_classify_french_fricative_response_200_all_probabilities import ( + PostClassifyFrenchFricativeResponse200AllProbabilities, + ) + + d = dict(src_dict) + success = d.pop("success", UNSET) + + predicted_fricative = d.pop("predicted_fricative", UNSET) + + confidence = d.pop("confidence", UNSET) + + _all_probabilities = d.pop("all_probabilities", UNSET) + all_probabilities: PostClassifyFrenchFricativeResponse200AllProbabilities | Unset + if isinstance(_all_probabilities, Unset): + all_probabilities = UNSET + else: + all_probabilities = PostClassifyFrenchFricativeResponse200AllProbabilities.from_dict( + _all_probabilities + ) + + audio_duration = d.pop("audio_duration", UNSET) + + processing_time_seconds = d.pop("processing_time_seconds", UNSET) + + model_name = d.pop("model_name", UNSET) + + expected_fricative_conditional = d.pop("expected_fricative (conditional)", UNSET) + + is_correct_conditional = d.pop("is_correct (conditional)", UNSET) + + expected_fricative_probability_conditional = d.pop( + "expected_fricative_probability (conditional)", UNSET + ) + + score_conditional = d.pop("score (conditional)", UNSET) + + post_classify_french_fricative_response_200 = cls( + success=success, + predicted_fricative=predicted_fricative, + confidence=confidence, + all_probabilities=all_probabilities, + audio_duration=audio_duration, + processing_time_seconds=processing_time_seconds, + model_name=model_name, + expected_fricative_conditional=expected_fricative_conditional, + is_correct_conditional=is_correct_conditional, + expected_fricative_probability_conditional=expected_fricative_probability_conditional, + score_conditional=score_conditional, + ) + + post_classify_french_fricative_response_200.additional_properties = d + return post_classify_french_fricative_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_fricative_response_200_all_probabilities.py b/src/vocametrix/_generated/models/post_classify_french_fricative_response_200_all_probabilities.py new file mode 100644 index 0000000..0726077 --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_fricative_response_200_all_probabilities.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostClassifyFrenchFricativeResponse200AllProbabilities") + + +@_attrs_define +class PostClassifyFrenchFricativeResponse200AllProbabilities: + """Object of probabilities for all 6 fricatives.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_classify_french_fricative_response_200_all_probabilities = cls() + + post_classify_french_fricative_response_200_all_probabilities.additional_properties = d + return post_classify_french_fricative_response_200_all_probabilities + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_body.py b/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_body.py new file mode 100644 index 0000000..55cc67f --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_body.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PostClassifyFrenchLiquidNasalBody") + + +@_attrs_define +class PostClassifyFrenchLiquidNasalBody: + """ + Attributes: + audio (str): Mode 1 (use ONE of audio/blobUrl/fileId). Direct audio file upload, multipart/form-data — the field + name MUST be exactly `audio`. + blob_url (str): Mode 2 (use ONE of audio/blobUrl/fileId), JSON body. HTTPS URL of the audio file, downloaded + server-side. + file_id (str): Mode 3 (use ONE of audio/blobUrl/fileId), JSON body. fileId from a prior /api/assignFileId + upload. + expected_liquid_nasal (str | Unset): Optional (also accepted as expectedLiquidNasal, any input mode). When + provided, the response is scored against this class. + """ + + audio: str + blob_url: str + file_id: str + expected_liquid_nasal: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + audio = self.audio + + blob_url = self.blob_url + + file_id = self.file_id + + expected_liquid_nasal = self.expected_liquid_nasal + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "audio": audio, + "blobUrl": blob_url, + "fileId": file_id, + } + ) + if expected_liquid_nasal is not UNSET: + field_dict["expected_liquid_nasal"] = expected_liquid_nasal + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + audio = d.pop("audio") + + blob_url = d.pop("blobUrl") + + file_id = d.pop("fileId") + + expected_liquid_nasal = d.pop("expected_liquid_nasal", UNSET) + + post_classify_french_liquid_nasal_body = cls( + audio=audio, + blob_url=blob_url, + file_id=file_id, + expected_liquid_nasal=expected_liquid_nasal, + ) + + post_classify_french_liquid_nasal_body.additional_properties = d + return post_classify_french_liquid_nasal_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_response_200.py b/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_response_200.py new file mode 100644 index 0000000..6fe6e43 --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_response_200.py @@ -0,0 +1,179 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.post_classify_french_liquid_nasal_response_200_all_probabilities import ( + PostClassifyFrenchLiquidNasalResponse200AllProbabilities, + ) + + +T = TypeVar("T", bound="PostClassifyFrenchLiquidNasalResponse200") + + +@_attrs_define +class PostClassifyFrenchLiquidNasalResponse200: + """ + Attributes: + success (bool | Unset): Boolean — true if the classification succeeded. + predicted_liquid_nasal (str | Unset): Predicted liquid/nasal (IPA). + confidence (str | Unset): Confidence for the predicted class (0.0 - 1.0). + all_probabilities (PostClassifyFrenchLiquidNasalResponse200AllProbabilities | Unset): Object of probabilities + for all 5 classes. + audio_duration (float | Unset): Audio duration in seconds. + processing_time_seconds (float | Unset): Server-side processing time in seconds. + model_name (str | Unset): Model used, e.g. "liquid-nasal-aphasix-champion". + expected_liquid_nasal_conditional (str | Unset): Echoed back only when expected_liquid_nasal/expectedLiquidNasal + was provided in the request. + is_correct_conditional (bool | Unset): Boolean — true when predicted_liquid_nasal matches expected_liquid_nasal. + expected_liquid_nasal_probability_conditional (str | Unset): The model's probability for expected_liquid_nasal, + from all_probabilities. + score_conditional (int | Unset): expected_liquid_nasal_probability rounded to a 0-100 integer. + """ + + success: bool | Unset = UNSET + predicted_liquid_nasal: str | Unset = UNSET + confidence: str | Unset = UNSET + all_probabilities: PostClassifyFrenchLiquidNasalResponse200AllProbabilities | Unset = UNSET + audio_duration: float | Unset = UNSET + processing_time_seconds: float | Unset = UNSET + model_name: str | Unset = UNSET + expected_liquid_nasal_conditional: str | Unset = UNSET + is_correct_conditional: bool | Unset = UNSET + expected_liquid_nasal_probability_conditional: str | Unset = UNSET + score_conditional: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + success = self.success + + predicted_liquid_nasal = self.predicted_liquid_nasal + + confidence = self.confidence + + all_probabilities: dict[str, Any] | Unset = UNSET + if not isinstance(self.all_probabilities, Unset): + all_probabilities = self.all_probabilities.to_dict() + + audio_duration = self.audio_duration + + processing_time_seconds = self.processing_time_seconds + + model_name = self.model_name + + expected_liquid_nasal_conditional = self.expected_liquid_nasal_conditional + + is_correct_conditional = self.is_correct_conditional + + expected_liquid_nasal_probability_conditional = ( + self.expected_liquid_nasal_probability_conditional + ) + + score_conditional = self.score_conditional + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if success is not UNSET: + field_dict["success"] = success + if predicted_liquid_nasal is not UNSET: + field_dict["predicted_liquid_nasal"] = predicted_liquid_nasal + if confidence is not UNSET: + field_dict["confidence"] = confidence + if all_probabilities is not UNSET: + field_dict["all_probabilities"] = all_probabilities + if audio_duration is not UNSET: + field_dict["audio_duration"] = audio_duration + if processing_time_seconds is not UNSET: + field_dict["processing_time_seconds"] = processing_time_seconds + if model_name is not UNSET: + field_dict["model_name"] = model_name + if expected_liquid_nasal_conditional is not UNSET: + field_dict["expected_liquid_nasal (conditional)"] = expected_liquid_nasal_conditional + if is_correct_conditional is not UNSET: + field_dict["is_correct (conditional)"] = is_correct_conditional + if expected_liquid_nasal_probability_conditional is not UNSET: + field_dict["expected_liquid_nasal_probability (conditional)"] = ( + expected_liquid_nasal_probability_conditional + ) + if score_conditional is not UNSET: + field_dict["score (conditional)"] = score_conditional + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.post_classify_french_liquid_nasal_response_200_all_probabilities import ( + PostClassifyFrenchLiquidNasalResponse200AllProbabilities, + ) + + d = dict(src_dict) + success = d.pop("success", UNSET) + + predicted_liquid_nasal = d.pop("predicted_liquid_nasal", UNSET) + + confidence = d.pop("confidence", UNSET) + + _all_probabilities = d.pop("all_probabilities", UNSET) + all_probabilities: PostClassifyFrenchLiquidNasalResponse200AllProbabilities | Unset + if isinstance(_all_probabilities, Unset): + all_probabilities = UNSET + else: + all_probabilities = PostClassifyFrenchLiquidNasalResponse200AllProbabilities.from_dict( + _all_probabilities + ) + + audio_duration = d.pop("audio_duration", UNSET) + + processing_time_seconds = d.pop("processing_time_seconds", UNSET) + + model_name = d.pop("model_name", UNSET) + + expected_liquid_nasal_conditional = d.pop("expected_liquid_nasal (conditional)", UNSET) + + is_correct_conditional = d.pop("is_correct (conditional)", UNSET) + + expected_liquid_nasal_probability_conditional = d.pop( + "expected_liquid_nasal_probability (conditional)", UNSET + ) + + score_conditional = d.pop("score (conditional)", UNSET) + + post_classify_french_liquid_nasal_response_200 = cls( + success=success, + predicted_liquid_nasal=predicted_liquid_nasal, + confidence=confidence, + all_probabilities=all_probabilities, + audio_duration=audio_duration, + processing_time_seconds=processing_time_seconds, + model_name=model_name, + expected_liquid_nasal_conditional=expected_liquid_nasal_conditional, + is_correct_conditional=is_correct_conditional, + expected_liquid_nasal_probability_conditional=expected_liquid_nasal_probability_conditional, + score_conditional=score_conditional, + ) + + post_classify_french_liquid_nasal_response_200.additional_properties = d + return post_classify_french_liquid_nasal_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_response_200_all_probabilities.py b/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_response_200_all_probabilities.py new file mode 100644 index 0000000..e641dfe --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_liquid_nasal_response_200_all_probabilities.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostClassifyFrenchLiquidNasalResponse200AllProbabilities") + + +@_attrs_define +class PostClassifyFrenchLiquidNasalResponse200AllProbabilities: + """Object of probabilities for all 5 classes.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_classify_french_liquid_nasal_response_200_all_probabilities = cls() + + post_classify_french_liquid_nasal_response_200_all_probabilities.additional_properties = d + return post_classify_french_liquid_nasal_response_200_all_probabilities + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_plosive_body.py b/src/vocametrix/_generated/models/post_classify_french_plosive_body.py new file mode 100644 index 0000000..06259d8 --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_plosive_body.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PostClassifyFrenchPlosiveBody") + + +@_attrs_define +class PostClassifyFrenchPlosiveBody: + """ + Attributes: + audio (str): Mode 1 (use ONE of audio/blobUrl/fileId). Direct audio file upload, multipart/form-data — the field + name MUST be exactly `audio`. + blob_url (str): Mode 2 (use ONE of audio/blobUrl/fileId), JSON body. HTTPS URL of the audio file, downloaded + server-side. + file_id (str): Mode 3 (use ONE of audio/blobUrl/fileId), JSON body. fileId from a prior /api/assignFileId + upload. + expected_plosive (str | Unset): Optional (also accepted as expectedPlosive, any input mode). When provided, the + response is scored against this plosive. + """ + + audio: str + blob_url: str + file_id: str + expected_plosive: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + audio = self.audio + + blob_url = self.blob_url + + file_id = self.file_id + + expected_plosive = self.expected_plosive + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "audio": audio, + "blobUrl": blob_url, + "fileId": file_id, + } + ) + if expected_plosive is not UNSET: + field_dict["expected_plosive"] = expected_plosive + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + audio = d.pop("audio") + + blob_url = d.pop("blobUrl") + + file_id = d.pop("fileId") + + expected_plosive = d.pop("expected_plosive", UNSET) + + post_classify_french_plosive_body = cls( + audio=audio, + blob_url=blob_url, + file_id=file_id, + expected_plosive=expected_plosive, + ) + + post_classify_french_plosive_body.additional_properties = d + return post_classify_french_plosive_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_plosive_response_200.py b/src/vocametrix/_generated/models/post_classify_french_plosive_response_200.py new file mode 100644 index 0000000..fc4f121 --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_plosive_response_200.py @@ -0,0 +1,177 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.post_classify_french_plosive_response_200_all_probabilities import ( + PostClassifyFrenchPlosiveResponse200AllProbabilities, + ) + + +T = TypeVar("T", bound="PostClassifyFrenchPlosiveResponse200") + + +@_attrs_define +class PostClassifyFrenchPlosiveResponse200: + """ + Attributes: + success (bool | Unset): Boolean — true if the classification succeeded. + predicted_plosive (str | Unset): Predicted plosive (IPA). + confidence (str | Unset): Confidence for the predicted plosive (0.0 - 1.0). + all_probabilities (PostClassifyFrenchPlosiveResponse200AllProbabilities | Unset): Object of probabilities for + all 6 plosives. + audio_duration (float | Unset): Audio duration in seconds. + processing_time_seconds (float | Unset): Server-side processing time in seconds. + model_name (str | Unset): Model used, e.g. "plosive-aphasix-champion". + expected_plosive_conditional (str | Unset): Echoed back only when expected_plosive/expectedPlosive was provided + in the request. + is_correct_conditional (bool | Unset): Boolean — true when predicted_plosive matches expected_plosive. + expected_plosive_probability_conditional (str | Unset): The model's probability for expected_plosive, from + all_probabilities. + score_conditional (int | Unset): expected_plosive_probability rounded to a 0-100 integer. + """ + + success: bool | Unset = UNSET + predicted_plosive: str | Unset = UNSET + confidence: str | Unset = UNSET + all_probabilities: PostClassifyFrenchPlosiveResponse200AllProbabilities | Unset = UNSET + audio_duration: float | Unset = UNSET + processing_time_seconds: float | Unset = UNSET + model_name: str | Unset = UNSET + expected_plosive_conditional: str | Unset = UNSET + is_correct_conditional: bool | Unset = UNSET + expected_plosive_probability_conditional: str | Unset = UNSET + score_conditional: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + success = self.success + + predicted_plosive = self.predicted_plosive + + confidence = self.confidence + + all_probabilities: dict[str, Any] | Unset = UNSET + if not isinstance(self.all_probabilities, Unset): + all_probabilities = self.all_probabilities.to_dict() + + audio_duration = self.audio_duration + + processing_time_seconds = self.processing_time_seconds + + model_name = self.model_name + + expected_plosive_conditional = self.expected_plosive_conditional + + is_correct_conditional = self.is_correct_conditional + + expected_plosive_probability_conditional = self.expected_plosive_probability_conditional + + score_conditional = self.score_conditional + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if success is not UNSET: + field_dict["success"] = success + if predicted_plosive is not UNSET: + field_dict["predicted_plosive"] = predicted_plosive + if confidence is not UNSET: + field_dict["confidence"] = confidence + if all_probabilities is not UNSET: + field_dict["all_probabilities"] = all_probabilities + if audio_duration is not UNSET: + field_dict["audio_duration"] = audio_duration + if processing_time_seconds is not UNSET: + field_dict["processing_time_seconds"] = processing_time_seconds + if model_name is not UNSET: + field_dict["model_name"] = model_name + if expected_plosive_conditional is not UNSET: + field_dict["expected_plosive (conditional)"] = expected_plosive_conditional + if is_correct_conditional is not UNSET: + field_dict["is_correct (conditional)"] = is_correct_conditional + if expected_plosive_probability_conditional is not UNSET: + field_dict["expected_plosive_probability (conditional)"] = ( + expected_plosive_probability_conditional + ) + if score_conditional is not UNSET: + field_dict["score (conditional)"] = score_conditional + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.post_classify_french_plosive_response_200_all_probabilities import ( + PostClassifyFrenchPlosiveResponse200AllProbabilities, + ) + + d = dict(src_dict) + success = d.pop("success", UNSET) + + predicted_plosive = d.pop("predicted_plosive", UNSET) + + confidence = d.pop("confidence", UNSET) + + _all_probabilities = d.pop("all_probabilities", UNSET) + all_probabilities: PostClassifyFrenchPlosiveResponse200AllProbabilities | Unset + if isinstance(_all_probabilities, Unset): + all_probabilities = UNSET + else: + all_probabilities = PostClassifyFrenchPlosiveResponse200AllProbabilities.from_dict( + _all_probabilities + ) + + audio_duration = d.pop("audio_duration", UNSET) + + processing_time_seconds = d.pop("processing_time_seconds", UNSET) + + model_name = d.pop("model_name", UNSET) + + expected_plosive_conditional = d.pop("expected_plosive (conditional)", UNSET) + + is_correct_conditional = d.pop("is_correct (conditional)", UNSET) + + expected_plosive_probability_conditional = d.pop( + "expected_plosive_probability (conditional)", UNSET + ) + + score_conditional = d.pop("score (conditional)", UNSET) + + post_classify_french_plosive_response_200 = cls( + success=success, + predicted_plosive=predicted_plosive, + confidence=confidence, + all_probabilities=all_probabilities, + audio_duration=audio_duration, + processing_time_seconds=processing_time_seconds, + model_name=model_name, + expected_plosive_conditional=expected_plosive_conditional, + is_correct_conditional=is_correct_conditional, + expected_plosive_probability_conditional=expected_plosive_probability_conditional, + score_conditional=score_conditional, + ) + + post_classify_french_plosive_response_200.additional_properties = d + return post_classify_french_plosive_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_plosive_response_200_all_probabilities.py b/src/vocametrix/_generated/models/post_classify_french_plosive_response_200_all_probabilities.py new file mode 100644 index 0000000..4c0e39f --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_plosive_response_200_all_probabilities.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostClassifyFrenchPlosiveResponse200AllProbabilities") + + +@_attrs_define +class PostClassifyFrenchPlosiveResponse200AllProbabilities: + """Object of probabilities for all 6 plosives.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_classify_french_plosive_response_200_all_probabilities = cls() + + post_classify_french_plosive_response_200_all_probabilities.additional_properties = d + return post_classify_french_plosive_response_200_all_probabilities + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_vowel_body.py b/src/vocametrix/_generated/models/post_classify_french_vowel_body.py new file mode 100644 index 0000000..95acb2f --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_vowel_body.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PostClassifyFrenchVowelBody") + + +@_attrs_define +class PostClassifyFrenchVowelBody: + """ + Attributes: + audio (str): Mode 1 (use ONE of audio/blobUrl/fileId). Direct audio file upload, multipart/form-data — the field + name MUST be exactly `audio`. Accepts wav, webm, ogg, mp3 (converted server-side to WAV 16kHz mono). + blob_url (str): Mode 2 (use ONE of audio/blobUrl/fileId), JSON body. HTTPS URL of the audio file, downloaded + server-side. + file_id (str): Mode 3 (use ONE of audio/blobUrl/fileId), JSON body. fileId from a prior /api/assignFileId + upload. + expected_vowel (str | Unset): Optional (also accepted as expectedVowel, any input mode). When provided, the + response is scored against this vowel. + """ + + audio: str + blob_url: str + file_id: str + expected_vowel: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + audio = self.audio + + blob_url = self.blob_url + + file_id = self.file_id + + expected_vowel = self.expected_vowel + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "audio": audio, + "blobUrl": blob_url, + "fileId": file_id, + } + ) + if expected_vowel is not UNSET: + field_dict["expected_vowel"] = expected_vowel + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + audio = d.pop("audio") + + blob_url = d.pop("blobUrl") + + file_id = d.pop("fileId") + + expected_vowel = d.pop("expected_vowel", UNSET) + + post_classify_french_vowel_body = cls( + audio=audio, + blob_url=blob_url, + file_id=file_id, + expected_vowel=expected_vowel, + ) + + post_classify_french_vowel_body.additional_properties = d + return post_classify_french_vowel_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_vowel_response_200.py b/src/vocametrix/_generated/models/post_classify_french_vowel_response_200.py new file mode 100644 index 0000000..f5bf457 --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_vowel_response_200.py @@ -0,0 +1,178 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.post_classify_french_vowel_response_200_all_probabilities import ( + PostClassifyFrenchVowelResponse200AllProbabilities, + ) + + +T = TypeVar("T", bound="PostClassifyFrenchVowelResponse200") + + +@_attrs_define +class PostClassifyFrenchVowelResponse200: + """ + Attributes: + success (bool | Unset): Boolean — true if the classification succeeded. + predicted_vowel (str | Unset): Predicted vowel (IPA). + confidence (str | Unset): Confidence for the predicted vowel (0.0 - 1.0). + all_probabilities (PostClassifyFrenchVowelResponse200AllProbabilities | Unset): Object of probabilities for all + 11 vowels, e.g. `{ "a": 0.009, "e": 0.91, ... }`. + audio_duration (float | Unset): Audio duration in seconds. + processing_time_seconds (float | Unset): Server-side processing time in seconds. + model_name (str | Unset): Model used, e.g. "vowel-aphasix-champion". + expected_vowel_conditional (str | Unset): Echoed back only when expected_vowel/expectedVowel was provided in the + request. + is_correct_conditional (bool | Unset): Boolean — true when predicted_vowel matches expected_vowel. + expected_vowel_probability_conditional (str | Unset): The model's probability for expected_vowel, from + all_probabilities. + score_conditional (int | Unset): expected_vowel_probability rounded to a 0-100 integer. 90-100 excellent, 50-89 + acceptable, 10-49 hard to recognize, 0-9 not recognized at all. + """ + + success: bool | Unset = UNSET + predicted_vowel: str | Unset = UNSET + confidence: str | Unset = UNSET + all_probabilities: PostClassifyFrenchVowelResponse200AllProbabilities | Unset = UNSET + audio_duration: float | Unset = UNSET + processing_time_seconds: float | Unset = UNSET + model_name: str | Unset = UNSET + expected_vowel_conditional: str | Unset = UNSET + is_correct_conditional: bool | Unset = UNSET + expected_vowel_probability_conditional: str | Unset = UNSET + score_conditional: int | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + success = self.success + + predicted_vowel = self.predicted_vowel + + confidence = self.confidence + + all_probabilities: dict[str, Any] | Unset = UNSET + if not isinstance(self.all_probabilities, Unset): + all_probabilities = self.all_probabilities.to_dict() + + audio_duration = self.audio_duration + + processing_time_seconds = self.processing_time_seconds + + model_name = self.model_name + + expected_vowel_conditional = self.expected_vowel_conditional + + is_correct_conditional = self.is_correct_conditional + + expected_vowel_probability_conditional = self.expected_vowel_probability_conditional + + score_conditional = self.score_conditional + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if success is not UNSET: + field_dict["success"] = success + if predicted_vowel is not UNSET: + field_dict["predicted_vowel"] = predicted_vowel + if confidence is not UNSET: + field_dict["confidence"] = confidence + if all_probabilities is not UNSET: + field_dict["all_probabilities"] = all_probabilities + if audio_duration is not UNSET: + field_dict["audio_duration"] = audio_duration + if processing_time_seconds is not UNSET: + field_dict["processing_time_seconds"] = processing_time_seconds + if model_name is not UNSET: + field_dict["model_name"] = model_name + if expected_vowel_conditional is not UNSET: + field_dict["expected_vowel (conditional)"] = expected_vowel_conditional + if is_correct_conditional is not UNSET: + field_dict["is_correct (conditional)"] = is_correct_conditional + if expected_vowel_probability_conditional is not UNSET: + field_dict["expected_vowel_probability (conditional)"] = ( + expected_vowel_probability_conditional + ) + if score_conditional is not UNSET: + field_dict["score (conditional)"] = score_conditional + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.post_classify_french_vowel_response_200_all_probabilities import ( + PostClassifyFrenchVowelResponse200AllProbabilities, + ) + + d = dict(src_dict) + success = d.pop("success", UNSET) + + predicted_vowel = d.pop("predicted_vowel", UNSET) + + confidence = d.pop("confidence", UNSET) + + _all_probabilities = d.pop("all_probabilities", UNSET) + all_probabilities: PostClassifyFrenchVowelResponse200AllProbabilities | Unset + if isinstance(_all_probabilities, Unset): + all_probabilities = UNSET + else: + all_probabilities = PostClassifyFrenchVowelResponse200AllProbabilities.from_dict( + _all_probabilities + ) + + audio_duration = d.pop("audio_duration", UNSET) + + processing_time_seconds = d.pop("processing_time_seconds", UNSET) + + model_name = d.pop("model_name", UNSET) + + expected_vowel_conditional = d.pop("expected_vowel (conditional)", UNSET) + + is_correct_conditional = d.pop("is_correct (conditional)", UNSET) + + expected_vowel_probability_conditional = d.pop( + "expected_vowel_probability (conditional)", UNSET + ) + + score_conditional = d.pop("score (conditional)", UNSET) + + post_classify_french_vowel_response_200 = cls( + success=success, + predicted_vowel=predicted_vowel, + confidence=confidence, + all_probabilities=all_probabilities, + audio_duration=audio_duration, + processing_time_seconds=processing_time_seconds, + model_name=model_name, + expected_vowel_conditional=expected_vowel_conditional, + is_correct_conditional=is_correct_conditional, + expected_vowel_probability_conditional=expected_vowel_probability_conditional, + score_conditional=score_conditional, + ) + + post_classify_french_vowel_response_200.additional_properties = d + return post_classify_french_vowel_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_classify_french_vowel_response_200_all_probabilities.py b/src/vocametrix/_generated/models/post_classify_french_vowel_response_200_all_probabilities.py new file mode 100644 index 0000000..5f6dabd --- /dev/null +++ b/src/vocametrix/_generated/models/post_classify_french_vowel_response_200_all_probabilities.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostClassifyFrenchVowelResponse200AllProbabilities") + + +@_attrs_define +class PostClassifyFrenchVowelResponse200AllProbabilities: + """Object of probabilities for all 11 vowels, e.g. `{ "a": 0.009, "e": 0.91, ... }`.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_classify_french_vowel_response_200_all_probabilities = cls() + + post_classify_french_vowel_response_200_all_probabilities.additional_properties = d + return post_classify_french_vowel_response_200_all_probabilities + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_estimate_formants_body.py b/src/vocametrix/_generated/models/post_estimate_formants_body.py new file mode 100644 index 0000000..8f9a5ba --- /dev/null +++ b/src/vocametrix/_generated/models/post_estimate_formants_body.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PostEstimateFormantsBody") + + +@_attrs_define +class PostEstimateFormantsBody: + """ + Attributes: + file_id (str): ID returned by /api/assignFileId - REQUIRED + start_sec (float): Start of the segment in seconds; 0 with stop_sec 0 analyses the whole file - REQUIRED + stop_sec (float): End of the segment in seconds; 0 with start_sec 0 analyses the whole file - REQUIRED + language (str | Unset): Language code, e.g. "fr-FR". Optional, default "en-US" + gender (str | Unset): "male" or "female". Optional, default "female" + age_group (str | Unset): "adult" or "child". Optional, default "adult" + sustained_vowel (bool | Unset): true for a sustained vowel: the most stable window is analysed. Optional, + default false + """ + + file_id: str + start_sec: float + stop_sec: float + language: str | Unset = UNSET + gender: str | Unset = UNSET + age_group: str | Unset = UNSET + sustained_vowel: bool | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file_id = self.file_id + + start_sec = self.start_sec + + stop_sec = self.stop_sec + + language = self.language + + gender = self.gender + + age_group = self.age_group + + sustained_vowel = self.sustained_vowel + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "fileId": file_id, + "start_sec": start_sec, + "stop_sec": stop_sec, + } + ) + if language is not UNSET: + field_dict["language"] = language + if gender is not UNSET: + field_dict["gender"] = gender + if age_group is not UNSET: + field_dict["ageGroup"] = age_group + if sustained_vowel is not UNSET: + field_dict["sustained_vowel"] = sustained_vowel + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + file_id = d.pop("fileId") + + start_sec = d.pop("start_sec") + + stop_sec = d.pop("stop_sec") + + language = d.pop("language", UNSET) + + gender = d.pop("gender", UNSET) + + age_group = d.pop("ageGroup", UNSET) + + sustained_vowel = d.pop("sustained_vowel", UNSET) + + post_estimate_formants_body = cls( + file_id=file_id, + start_sec=start_sec, + stop_sec=stop_sec, + language=language, + gender=gender, + age_group=age_group, + sustained_vowel=sustained_vowel, + ) + + post_estimate_formants_body.additional_properties = d + return post_estimate_formants_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_estimate_formants_response_200.py b/src/vocametrix/_generated/models/post_estimate_formants_response_200.py new file mode 100644 index 0000000..4909c41 --- /dev/null +++ b/src/vocametrix/_generated/models/post_estimate_formants_response_200.py @@ -0,0 +1,213 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.post_estimate_formants_response_200_formants import ( + PostEstimateFormantsResponse200Formants, + ) + from ..models.post_estimate_formants_response_200_ipa_coordinates import ( + PostEstimateFormantsResponse200IpaCoordinates, + ) + from ..models.post_estimate_formants_response_200_speaker_info import ( + PostEstimateFormantsResponse200SpeakerInfo, + ) + from ..models.post_estimate_formants_response_200_suggestions_item import ( + PostEstimateFormantsResponse200SuggestionsItem, + ) + + +T = TypeVar("T", bound="PostEstimateFormantsResponse200") + + +@_attrs_define +class PostEstimateFormantsResponse200: + """ + Attributes: + success (bool | Unset): boolean - true when formants were measured + formants (PostEstimateFormantsResponse200Formants | Unset): object - {f1_mean, f2_mean, f3_mean (Hz, f3 may be + null), f1_std, f2_std, f3_std, num_measurements, f1_cv, f2_cv, estimated_f0} + ipa_coordinates (PostEstimateFormantsResponse200IpaCoordinates | Unset): object - {x, y} between 0 and 1: x + front to back, y close to open + stability_score (float | Unset): number - Stability of the formant track + language (str | Unset): Echo of the language parameter + analysis_duration (float | Unset): number - Analysed duration in seconds + speaker_info (PostEstimateFormantsResponse200SpeakerInfo | Unset): object - {gender, age_group} used for the + analysis + analysis_parameters (str | Unset): Parameter set used: "adult_female_default", "adult_male", "adult_female" or + "child" + error_type (str | Unset): When success is false: "insufficient_data", "analysis_failure", "f0_failure" or + "unknown" + suggestions (list[PostEstimateFormantsResponse200SuggestionsItem] | Unset): array - When success is false: tips + to get a usable recording + """ + + success: bool | Unset = UNSET + formants: PostEstimateFormantsResponse200Formants | Unset = UNSET + ipa_coordinates: PostEstimateFormantsResponse200IpaCoordinates | Unset = UNSET + stability_score: float | Unset = UNSET + language: str | Unset = UNSET + analysis_duration: float | Unset = UNSET + speaker_info: PostEstimateFormantsResponse200SpeakerInfo | Unset = UNSET + analysis_parameters: str | Unset = UNSET + error_type: str | Unset = UNSET + suggestions: list[PostEstimateFormantsResponse200SuggestionsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + success = self.success + + formants: dict[str, Any] | Unset = UNSET + if not isinstance(self.formants, Unset): + formants = self.formants.to_dict() + + ipa_coordinates: dict[str, Any] | Unset = UNSET + if not isinstance(self.ipa_coordinates, Unset): + ipa_coordinates = self.ipa_coordinates.to_dict() + + stability_score = self.stability_score + + language = self.language + + analysis_duration = self.analysis_duration + + speaker_info: dict[str, Any] | Unset = UNSET + if not isinstance(self.speaker_info, Unset): + speaker_info = self.speaker_info.to_dict() + + analysis_parameters = self.analysis_parameters + + error_type = self.error_type + + suggestions: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.suggestions, Unset): + suggestions = [] + for suggestions_item_data in self.suggestions: + suggestions_item = suggestions_item_data.to_dict() + suggestions.append(suggestions_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if success is not UNSET: + field_dict["success"] = success + if formants is not UNSET: + field_dict["formants"] = formants + if ipa_coordinates is not UNSET: + field_dict["ipa_coordinates"] = ipa_coordinates + if stability_score is not UNSET: + field_dict["stability_score"] = stability_score + if language is not UNSET: + field_dict["language"] = language + if analysis_duration is not UNSET: + field_dict["analysis_duration"] = analysis_duration + if speaker_info is not UNSET: + field_dict["speaker_info"] = speaker_info + if analysis_parameters is not UNSET: + field_dict["analysis_parameters"] = analysis_parameters + if error_type is not UNSET: + field_dict["error_type"] = error_type + if suggestions is not UNSET: + field_dict["suggestions"] = suggestions + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.post_estimate_formants_response_200_formants import ( + PostEstimateFormantsResponse200Formants, + ) + from ..models.post_estimate_formants_response_200_ipa_coordinates import ( + PostEstimateFormantsResponse200IpaCoordinates, + ) + from ..models.post_estimate_formants_response_200_speaker_info import ( + PostEstimateFormantsResponse200SpeakerInfo, + ) + from ..models.post_estimate_formants_response_200_suggestions_item import ( + PostEstimateFormantsResponse200SuggestionsItem, + ) + + d = dict(src_dict) + success = d.pop("success", UNSET) + + _formants = d.pop("formants", UNSET) + formants: PostEstimateFormantsResponse200Formants | Unset + if isinstance(_formants, Unset): + formants = UNSET + else: + formants = PostEstimateFormantsResponse200Formants.from_dict(_formants) + + _ipa_coordinates = d.pop("ipa_coordinates", UNSET) + ipa_coordinates: PostEstimateFormantsResponse200IpaCoordinates | Unset + if isinstance(_ipa_coordinates, Unset): + ipa_coordinates = UNSET + else: + ipa_coordinates = PostEstimateFormantsResponse200IpaCoordinates.from_dict( + _ipa_coordinates + ) + + stability_score = d.pop("stability_score", UNSET) + + language = d.pop("language", UNSET) + + analysis_duration = d.pop("analysis_duration", UNSET) + + _speaker_info = d.pop("speaker_info", UNSET) + speaker_info: PostEstimateFormantsResponse200SpeakerInfo | Unset + if isinstance(_speaker_info, Unset): + speaker_info = UNSET + else: + speaker_info = PostEstimateFormantsResponse200SpeakerInfo.from_dict(_speaker_info) + + analysis_parameters = d.pop("analysis_parameters", UNSET) + + error_type = d.pop("error_type", UNSET) + + _suggestions = d.pop("suggestions", UNSET) + suggestions: list[PostEstimateFormantsResponse200SuggestionsItem] | Unset = UNSET + if _suggestions is not UNSET: + suggestions = [] + for suggestions_item_data in _suggestions: + suggestions_item = PostEstimateFormantsResponse200SuggestionsItem.from_dict( + suggestions_item_data + ) + + suggestions.append(suggestions_item) + + post_estimate_formants_response_200 = cls( + success=success, + formants=formants, + ipa_coordinates=ipa_coordinates, + stability_score=stability_score, + language=language, + analysis_duration=analysis_duration, + speaker_info=speaker_info, + analysis_parameters=analysis_parameters, + error_type=error_type, + suggestions=suggestions, + ) + + post_estimate_formants_response_200.additional_properties = d + return post_estimate_formants_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_estimate_formants_response_200_formants.py b/src/vocametrix/_generated/models/post_estimate_formants_response_200_formants.py new file mode 100644 index 0000000..5f4aca7 --- /dev/null +++ b/src/vocametrix/_generated/models/post_estimate_formants_response_200_formants.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostEstimateFormantsResponse200Formants") + + +@_attrs_define +class PostEstimateFormantsResponse200Formants: + """object - {f1_mean, f2_mean, f3_mean (Hz, f3 may be null), f1_std, f2_std, f3_std, num_measurements, f1_cv, f2_cv, + estimated_f0} + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_estimate_formants_response_200_formants = cls() + + post_estimate_formants_response_200_formants.additional_properties = d + return post_estimate_formants_response_200_formants + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_estimate_formants_response_200_ipa_coordinates.py b/src/vocametrix/_generated/models/post_estimate_formants_response_200_ipa_coordinates.py new file mode 100644 index 0000000..87938d9 --- /dev/null +++ b/src/vocametrix/_generated/models/post_estimate_formants_response_200_ipa_coordinates.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostEstimateFormantsResponse200IpaCoordinates") + + +@_attrs_define +class PostEstimateFormantsResponse200IpaCoordinates: + """object - {x, y} between 0 and 1: x front to back, y close to open""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_estimate_formants_response_200_ipa_coordinates = cls() + + post_estimate_formants_response_200_ipa_coordinates.additional_properties = d + return post_estimate_formants_response_200_ipa_coordinates + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_estimate_formants_response_200_speaker_info.py b/src/vocametrix/_generated/models/post_estimate_formants_response_200_speaker_info.py new file mode 100644 index 0000000..150a6d8 --- /dev/null +++ b/src/vocametrix/_generated/models/post_estimate_formants_response_200_speaker_info.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostEstimateFormantsResponse200SpeakerInfo") + + +@_attrs_define +class PostEstimateFormantsResponse200SpeakerInfo: + """object - {gender, age_group} used for the analysis""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_estimate_formants_response_200_speaker_info = cls() + + post_estimate_formants_response_200_speaker_info.additional_properties = d + return post_estimate_formants_response_200_speaker_info + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_estimate_formants_response_200_suggestions_item.py b/src/vocametrix/_generated/models/post_estimate_formants_response_200_suggestions_item.py new file mode 100644 index 0000000..5a47a6f --- /dev/null +++ b/src/vocametrix/_generated/models/post_estimate_formants_response_200_suggestions_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostEstimateFormantsResponse200SuggestionsItem") + + +@_attrs_define +class PostEstimateFormantsResponse200SuggestionsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_estimate_formants_response_200_suggestions_item = cls() + + post_estimate_formants_response_200_suggestions_item.additional_properties = d + return post_estimate_formants_response_200_suggestions_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_french_to_ipa_agent_body.py b/src/vocametrix/_generated/models/post_french_to_ipa_agent_body.py index b2734b6..cd65112 100644 --- a/src/vocametrix/_generated/models/post_french_to_ipa_agent_body.py +++ b/src/vocametrix/_generated/models/post_french_to_ipa_agent_body.py @@ -24,7 +24,7 @@ class PostFrenchToIpaAgentBody: phonetic_input (list[PostFrenchToIpaAgentBodyPhoneticInputItem]): REQUIRED. Either a single French word as a string, OR a JSON-stringified array of up to 20 strings. The server detects which by attempting JSON.parse. thread_id (str | Unset): Optional. Thread ID for multi-turn continuity. - email (str | Unset): Optional. Used by anonymous-key validation flow. + email (str | Unset): Optional. Used by the credit-validation flow. """ phonetic_input: list[PostFrenchToIpaAgentBodyPhoneticInputItem] diff --git a/src/vocametrix/_generated/models/post_french_to_ipa_agent_response_200.py b/src/vocametrix/_generated/models/post_french_to_ipa_agent_response_200.py index 1cdbd4a..e786780 100644 --- a/src/vocametrix/_generated/models/post_french_to_ipa_agent_response_200.py +++ b/src/vocametrix/_generated/models/post_french_to_ipa_agent_response_200.py @@ -28,7 +28,6 @@ class PostFrenchToIpaAgentResponse200: thread_id (str | Unset): Thread ID. agent_name (str | Unset): Agent identifier. remaining_credits (float | Unset): Number. - is_anonymous_session (bool | Unset): Boolean. """ success: bool | Unset = UNSET @@ -36,7 +35,6 @@ class PostFrenchToIpaAgentResponse200: thread_id: str | Unset = UNSET agent_name: str | Unset = UNSET remaining_credits: float | Unset = UNSET - is_anonymous_session: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,8 +50,6 @@ def to_dict(self) -> dict[str, Any]: remaining_credits = self.remaining_credits - is_anonymous_session = self.is_anonymous_session - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -67,8 +63,6 @@ def to_dict(self) -> dict[str, Any]: field_dict["agentName"] = agent_name if remaining_credits is not UNSET: field_dict["remaining_credits"] = remaining_credits - if is_anonymous_session is not UNSET: - field_dict["isAnonymousSession"] = is_anonymous_session return field_dict @@ -94,15 +88,12 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: remaining_credits = d.pop("remaining_credits", UNSET) - is_anonymous_session = d.pop("isAnonymousSession", UNSET) - post_french_to_ipa_agent_response_200 = cls( success=success, result=result, thread_id=thread_id, agent_name=agent_name, remaining_credits=remaining_credits, - is_anonymous_session=is_anonymous_session, ) post_french_to_ipa_agent_response_200.additional_properties = d diff --git a/src/vocametrix/_generated/models/post_language_chat_pronunciation_body.py b/src/vocametrix/_generated/models/post_language_chat_pronunciation_body.py index 2a44b0a..4825c17 100644 --- a/src/vocametrix/_generated/models/post_language_chat_pronunciation_body.py +++ b/src/vocametrix/_generated/models/post_language_chat_pronunciation_body.py @@ -27,7 +27,7 @@ class PostLanguageChatPronunciationBody: topic (str): REQUIRED. Conversation topic. native_language (str | Unset): Optional. The learner's native language code. thread_id (str | Unset): Optional. Thread ID for multi-turn continuity. - email (str | Unset): Optional. Used by anonymous-key validation flow. + email (str | Unset): Optional. Used by the credit-validation flow. assessment_history (list[PostLanguageChatPronunciationBodyAssessmentHistoryItem] | Unset): Optional. Array or object of prior pronunciation-assessment results to feed into the coach for grounded feedback. """ diff --git a/src/vocametrix/_generated/models/post_language_chat_pronunciation_response_200.py b/src/vocametrix/_generated/models/post_language_chat_pronunciation_response_200.py index 61e2412..44c0ba3 100644 --- a/src/vocametrix/_generated/models/post_language_chat_pronunciation_response_200.py +++ b/src/vocametrix/_generated/models/post_language_chat_pronunciation_response_200.py @@ -25,7 +25,6 @@ class PostLanguageChatPronunciationResponse200: thread_id (str | Unset): Thread ID. run_status (str | Unset): Run status string. remaining_credits (float | Unset): Number. - is_anonymous_session (bool | Unset): Boolean. configuration (PostLanguageChatPronunciationResponse200Configuration | Unset): Object — passthrough of resolved language, nativeLanguage, ageLevel, topic. """ @@ -34,7 +33,6 @@ class PostLanguageChatPronunciationResponse200: thread_id: str | Unset = UNSET run_status: str | Unset = UNSET remaining_credits: float | Unset = UNSET - is_anonymous_session: bool | Unset = UNSET configuration: PostLanguageChatPronunciationResponse200Configuration | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -47,8 +45,6 @@ def to_dict(self) -> dict[str, Any]: remaining_credits = self.remaining_credits - is_anonymous_session = self.is_anonymous_session - configuration: dict[str, Any] | Unset = UNSET if not isinstance(self.configuration, Unset): configuration = self.configuration.to_dict() @@ -64,8 +60,6 @@ def to_dict(self) -> dict[str, Any]: field_dict["runStatus"] = run_status if remaining_credits is not UNSET: field_dict["remaining_credits"] = remaining_credits - if is_anonymous_session is not UNSET: - field_dict["isAnonymousSession"] = is_anonymous_session if configuration is not UNSET: field_dict["configuration"] = configuration @@ -86,8 +80,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: remaining_credits = d.pop("remaining_credits", UNSET) - is_anonymous_session = d.pop("isAnonymousSession", UNSET) - _configuration = d.pop("configuration", UNSET) configuration: PostLanguageChatPronunciationResponse200Configuration | Unset if isinstance(_configuration, Unset): @@ -102,7 +94,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: thread_id=thread_id, run_status=run_status, remaining_credits=remaining_credits, - is_anonymous_session=is_anonymous_session, configuration=configuration, ) diff --git a/src/vocametrix/_generated/models/post_speech_exercise_generator_response_200.py b/src/vocametrix/_generated/models/post_speech_exercise_generator_response_200.py index 7efedc9..acb6234 100644 --- a/src/vocametrix/_generated/models/post_speech_exercise_generator_response_200.py +++ b/src/vocametrix/_generated/models/post_speech_exercise_generator_response_200.py @@ -20,7 +20,6 @@ class PostSpeechExerciseGeneratorResponse200: agent_name (str | Unset): Identifier of the agent that produced the reply run_status (str | Unset): Internal run state (e.g., "completed") remaining_credits (float | Unset): Number of API credits remaining in your account - is_anonymous_session (bool | Unset): Boolean — true if the call used an anonymous_ key parameters (str | Unset): Echo of the parameters used to produce the reply (ageLevel, speechChallenge, language) """ @@ -29,7 +28,6 @@ class PostSpeechExerciseGeneratorResponse200: agent_name: str | Unset = UNSET run_status: str | Unset = UNSET remaining_credits: float | Unset = UNSET - is_anonymous_session: bool | Unset = UNSET parameters: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -44,8 +42,6 @@ def to_dict(self) -> dict[str, Any]: remaining_credits = self.remaining_credits - is_anonymous_session = self.is_anonymous_session - parameters = self.parameters field_dict: dict[str, Any] = {} @@ -61,8 +57,6 @@ def to_dict(self) -> dict[str, Any]: field_dict["runStatus"] = run_status if remaining_credits is not UNSET: field_dict["remaining_credits"] = remaining_credits - if is_anonymous_session is not UNSET: - field_dict["isAnonymousSession"] = is_anonymous_session if parameters is not UNSET: field_dict["parameters"] = parameters @@ -81,8 +75,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: remaining_credits = d.pop("remaining_credits", UNSET) - is_anonymous_session = d.pop("isAnonymousSession", UNSET) - parameters = d.pop("parameters", UNSET) post_speech_exercise_generator_response_200 = cls( @@ -91,7 +83,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: agent_name=agent_name, run_status=run_status, remaining_credits=remaining_credits, - is_anonymous_session=is_anonymous_session, parameters=parameters, ) diff --git a/src/vocametrix/_generated/models/post_syntax_checker_agent_body.py b/src/vocametrix/_generated/models/post_syntax_checker_agent_body.py index 1661bfb..be7cdab 100644 --- a/src/vocametrix/_generated/models/post_syntax_checker_agent_body.py +++ b/src/vocametrix/_generated/models/post_syntax_checker_agent_body.py @@ -18,7 +18,7 @@ class PostSyntaxCheckerAgentBody: text (str): REQUIRED. Text to analyze (≤ 5000 characters). locale (str): REQUIRED. Language code (validated via validateLanguageCode). thread_id (str | Unset): Optional. Thread ID for multi-turn continuity. - email (str | Unset): Optional. Used by anonymous-key validation flow. + email (str | Unset): Optional. Used by the credit-validation flow. """ text: str diff --git a/src/vocametrix/_generated/models/post_syntax_checker_agent_response_200.py b/src/vocametrix/_generated/models/post_syntax_checker_agent_response_200.py index 9f55a32..2c42e1c 100644 --- a/src/vocametrix/_generated/models/post_syntax_checker_agent_response_200.py +++ b/src/vocametrix/_generated/models/post_syntax_checker_agent_response_200.py @@ -32,14 +32,12 @@ class PostSyntaxCheckerAgentResponse200: metadata (PostSyntaxCheckerAgentResponse200Metadata | Unset): Object: { locale, textLength, threadId, agentName, processingTimeSeconds, timestamp }. remaining_credits (float | Unset): Number. - is_anonymous_session (bool | Unset): Boolean. """ success: bool | Unset = UNSET analysis: PostSyntaxCheckerAgentResponse200Analysis | Unset = UNSET metadata: PostSyntaxCheckerAgentResponse200Metadata | Unset = UNSET remaining_credits: float | Unset = UNSET - is_anonymous_session: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,8 +53,6 @@ def to_dict(self) -> dict[str, Any]: remaining_credits = self.remaining_credits - is_anonymous_session = self.is_anonymous_session - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -68,8 +64,6 @@ def to_dict(self) -> dict[str, Any]: field_dict["metadata"] = metadata if remaining_credits is not UNSET: field_dict["remaining_credits"] = remaining_credits - if is_anonymous_session is not UNSET: - field_dict["isAnonymousSession"] = is_anonymous_session return field_dict @@ -101,14 +95,11 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: remaining_credits = d.pop("remaining_credits", UNSET) - is_anonymous_session = d.pop("isAnonymousSession", UNSET) - post_syntax_checker_agent_response_200 = cls( success=success, analysis=analysis, metadata=metadata, remaining_credits=remaining_credits, - is_anonymous_session=is_anonymous_session, ) post_syntax_checker_agent_response_200.additional_properties = d diff --git a/src/vocametrix/_generated/models/post_therapy_planning_agent_body.py b/src/vocametrix/_generated/models/post_therapy_planning_agent_body.py index 00a8485..70ebb79 100644 --- a/src/vocametrix/_generated/models/post_therapy_planning_agent_body.py +++ b/src/vocametrix/_generated/models/post_therapy_planning_agent_body.py @@ -30,7 +30,7 @@ class PostTherapyPlanningAgentBody: (typically `{disfluency_types_detected, overall_fluency_rate, total_segments, ...}`). patient_anamnesis (str | Unset): Optional. Patient context — `demographics: {age}`, `clinical_history: {diagnosis, severity}`, `therapy_information: {current_treatment_approach, total_sessions_completed}`, etc. - email (str | Unset): Optional. Used by anonymous-key validation flow. + email (str | Unset): Optional. Used by the credit-validation flow. """ session_metadata: PostTherapyPlanningAgentBodySessionMetadata diff --git a/src/vocametrix/_generated/models/post_therapy_planning_agent_response_200.py b/src/vocametrix/_generated/models/post_therapy_planning_agent_response_200.py index 66a7a02..d036d18 100644 --- a/src/vocametrix/_generated/models/post_therapy_planning_agent_response_200.py +++ b/src/vocametrix/_generated/models/post_therapy_planning_agent_response_200.py @@ -41,7 +41,6 @@ class PostTherapyPlanningAgentResponse200: all_messages (list[PostTherapyPlanningAgentResponse200AllMessagesItem] | Unset): Array — full thread message history. remaining_credits (float | Unset): Number. - is_anonymous_session (bool | Unset): Boolean. metadata (PostTherapyPlanningAgentResponse200Metadata | Unset): Object: { patient_id, session_id, processing_time_seconds, disfluency_types, fluency_rate, total_segments_analyzed, response_metadata: {responseLength, containsStructuredData, parseSuccess} }. @@ -56,7 +55,6 @@ class PostTherapyPlanningAgentResponse200: recommendation: PostTherapyPlanningAgentResponse200Recommendation | Unset = UNSET all_messages: list[PostTherapyPlanningAgentResponse200AllMessagesItem] | Unset = UNSET remaining_credits: float | Unset = UNSET - is_anonymous_session: bool | Unset = UNSET metadata: PostTherapyPlanningAgentResponse200Metadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -88,8 +86,6 @@ def to_dict(self) -> dict[str, Any]: remaining_credits = self.remaining_credits - is_anonymous_session = self.is_anonymous_session - metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -115,8 +111,6 @@ def to_dict(self) -> dict[str, Any]: field_dict["allMessages"] = all_messages if remaining_credits is not UNSET: field_dict["remaining_credits"] = remaining_credits - if is_anonymous_session is not UNSET: - field_dict["isAnonymousSession"] = is_anonymous_session if metadata is not UNSET: field_dict["metadata"] = metadata @@ -174,8 +168,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: remaining_credits = d.pop("remaining_credits", UNSET) - is_anonymous_session = d.pop("isAnonymousSession", UNSET) - _metadata = d.pop("metadata", UNSET) metadata: PostTherapyPlanningAgentResponse200Metadata | Unset if isinstance(_metadata, Unset): @@ -193,7 +185,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: recommendation=recommendation, all_messages=all_messages, remaining_credits=remaining_credits, - is_anonymous_session=is_anonymous_session, metadata=metadata, ) diff --git a/src/vocametrix/_generated/models/post_voice_assessment_body.py b/src/vocametrix/_generated/models/post_voice_assessment_body.py new file mode 100644 index 0000000..0ee4ee9 --- /dev/null +++ b/src/vocametrix/_generated/models/post_voice_assessment_body.py @@ -0,0 +1,179 @@ +from __future__ import annotations + +from collections.abc import Mapping +from io import BytesIO +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from .. import types +from ..types import UNSET, File, FileTypes, Unset + +T = TypeVar("T", bound="PostVoiceAssessmentBody") + + +@_attrs_define +class PostVoiceAssessmentBody: + """ + Attributes: + language (str): REQUIRED. Language of the recordings: "fr" or "en" (selects the AVQI version and the + pronunciation locale). + vowel (File | Unset): Sustained vowel recording (e.g. /a/ for at least 3 seconds). Optional, but at least one of + vowel or speech is required. + speech (File | Unset): Connected speech recording (e.g. a reading passage). Optional, but at least one of vowel + or speech is required. + age (int | Unset): Patient age in years. Optional, but required when 'vowel' is sent. + gender (str | Unset): Patient gender: "male", "female" or "other". Optional, but required when 'vowel' is sent. + reference_text (str | Unset): Text read in the speech recording. Optional; when given, a pronunciation + assessment is added. + label (str | Unset): Free label returned as is. Optional. + filename (str | Unset): Free file name returned as is. Optional. + """ + + language: str + vowel: File | Unset = UNSET + speech: File | Unset = UNSET + age: int | Unset = UNSET + gender: str | Unset = UNSET + reference_text: str | Unset = UNSET + label: str | Unset = UNSET + filename: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + language = self.language + + vowel: FileTypes | Unset = UNSET + if not isinstance(self.vowel, Unset): + vowel = self.vowel.to_tuple() + + speech: FileTypes | Unset = UNSET + if not isinstance(self.speech, Unset): + speech = self.speech.to_tuple() + + age = self.age + + gender = self.gender + + reference_text = self.reference_text + + label = self.label + + filename = self.filename + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "language": language, + } + ) + if vowel is not UNSET: + field_dict["vowel"] = vowel + if speech is not UNSET: + field_dict["speech"] = speech + if age is not UNSET: + field_dict["age"] = age + if gender is not UNSET: + field_dict["gender"] = gender + if reference_text is not UNSET: + field_dict["reference_text"] = reference_text + if label is not UNSET: + field_dict["label"] = label + if filename is not UNSET: + field_dict["filename"] = filename + + return field_dict + + def to_multipart(self) -> types.RequestFiles: + files: types.RequestFiles = [] + + files.append(("language", (None, str(self.language).encode(), "text/plain"))) + + if not isinstance(self.vowel, Unset): + files.append(("vowel", self.vowel.to_tuple())) + + if not isinstance(self.speech, Unset): + files.append(("speech", self.speech.to_tuple())) + + if not isinstance(self.age, Unset): + files.append(("age", (None, str(self.age).encode(), "text/plain"))) + + if not isinstance(self.gender, Unset): + files.append(("gender", (None, str(self.gender).encode(), "text/plain"))) + + if not isinstance(self.reference_text, Unset): + files.append( + ("reference_text", (None, str(self.reference_text).encode(), "text/plain")) + ) + + if not isinstance(self.label, Unset): + files.append(("label", (None, str(self.label).encode(), "text/plain"))) + + if not isinstance(self.filename, Unset): + files.append(("filename", (None, str(self.filename).encode(), "text/plain"))) + + for prop_name, prop in self.additional_properties.items(): + files.append((prop_name, (None, str(prop).encode(), "text/plain"))) + + return files + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + language = d.pop("language") + + _vowel = d.pop("vowel", UNSET) + vowel: File | Unset + if isinstance(_vowel, Unset): + vowel = UNSET + else: + vowel = File(payload=BytesIO(_vowel)) + + _speech = d.pop("speech", UNSET) + speech: File | Unset + if isinstance(_speech, Unset): + speech = UNSET + else: + speech = File(payload=BytesIO(_speech)) + + age = d.pop("age", UNSET) + + gender = d.pop("gender", UNSET) + + reference_text = d.pop("reference_text", UNSET) + + label = d.pop("label", UNSET) + + filename = d.pop("filename", UNSET) + + post_voice_assessment_body = cls( + language=language, + vowel=vowel, + speech=speech, + age=age, + gender=gender, + reference_text=reference_text, + label=label, + filename=filename, + ) + + post_voice_assessment_body.additional_properties = d + return post_voice_assessment_body + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_voice_assessment_response_200.py b/src/vocametrix/_generated/models/post_voice_assessment_response_200.py new file mode 100644 index 0000000..1377e70 --- /dev/null +++ b/src/vocametrix/_generated/models/post_voice_assessment_response_200.py @@ -0,0 +1,278 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.post_voice_assessment_response_200_audio import ( + PostVoiceAssessmentResponse200Audio, + ) + from ..models.post_voice_assessment_response_200_details import ( + PostVoiceAssessmentResponse200Details, + ) + from ..models.post_voice_assessment_response_200_errors import ( + PostVoiceAssessmentResponse200Errors, + ) + from ..models.post_voice_assessment_response_200_summary import ( + PostVoiceAssessmentResponse200Summary, + ) + from ..models.post_voice_assessment_response_200_warnings_item import ( + PostVoiceAssessmentResponse200WarningsItem, + ) + + +T = TypeVar("T", bound="PostVoiceAssessmentResponse200") + + +@_attrs_define +class PostVoiceAssessmentResponse200: + """ + Attributes: + status (str | Unset): "ok" when every measure succeeded, "partial" otherwise. + filename (str | Unset): Echo of the filename parameter. + label (str | Unset): Echo of the label parameter. + language (str | Unset): Echo of the language parameter. + age (int | Unset): Echo of the age parameter, or null. + gender (str | Unset): Echo of the gender parameter, or null. + reference_text (str | Unset): Echo of the reference_text parameter, or null. + audio (PostVoiceAssessmentResponse200Audio | Unset): object - {vowel, speech}, each {duration_seconds, + sample_rate: 16000, channels: 1} or null. + summary (PostVoiceAssessmentResponse200Summary | Unset): object - Key results: avqi, avqi_cpps, + jitter_local_percent, shimmer_local_percent, mean_f0_hz, hnr_db, cpp_db, gne, h1_h2_db, abi, the severities + (jitter, shimmer, hnr, cpp, breathiness) and abnormal_flags [{measure, severity}]. A key is absent when its + measure failed. + details (PostVoiceAssessmentResponse200Details | Unset): object - Raw result of every underlying measure, keyed + by measure (jitter_shimmer, cpp, gne, hnr, h1_h2, formants, spectral, voice_dynamics, gemaps, pitch, intensity, + speech_percentage, speech_segments, avqi, abi, pronunciation). + errors (PostVoiceAssessmentResponse200Errors | Unset): object - Failed measures: {measure: {message, status}}. + warnings (list[PostVoiceAssessmentResponse200WarningsItem] | Unset): array - Warnings (strings). + pipeline_version (str | Unset): Pipeline version, e.g. "voice-assessment@1.0.0". + processed_at (datetime.datetime | Unset): ISO 8601 timestamp of the analysis. + processing_time_ms (float | Unset): number - Processing time in milliseconds. + """ + + status: str | Unset = UNSET + filename: str | Unset = UNSET + label: str | Unset = UNSET + language: str | Unset = UNSET + age: int | Unset = UNSET + gender: str | Unset = UNSET + reference_text: str | Unset = UNSET + audio: PostVoiceAssessmentResponse200Audio | Unset = UNSET + summary: PostVoiceAssessmentResponse200Summary | Unset = UNSET + details: PostVoiceAssessmentResponse200Details | Unset = UNSET + errors: PostVoiceAssessmentResponse200Errors | Unset = UNSET + warnings: list[PostVoiceAssessmentResponse200WarningsItem] | Unset = UNSET + pipeline_version: str | Unset = UNSET + processed_at: datetime.datetime | Unset = UNSET + processing_time_ms: float | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + status = self.status + + filename = self.filename + + label = self.label + + language = self.language + + age = self.age + + gender = self.gender + + reference_text = self.reference_text + + audio: dict[str, Any] | Unset = UNSET + if not isinstance(self.audio, Unset): + audio = self.audio.to_dict() + + summary: dict[str, Any] | Unset = UNSET + if not isinstance(self.summary, Unset): + summary = self.summary.to_dict() + + details: dict[str, Any] | Unset = UNSET + if not isinstance(self.details, Unset): + details = self.details.to_dict() + + errors: dict[str, Any] | Unset = UNSET + if not isinstance(self.errors, Unset): + errors = self.errors.to_dict() + + warnings: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.warnings, Unset): + warnings = [] + for warnings_item_data in self.warnings: + warnings_item = warnings_item_data.to_dict() + warnings.append(warnings_item) + + pipeline_version = self.pipeline_version + + processed_at: str | Unset = UNSET + if not isinstance(self.processed_at, Unset): + processed_at = self.processed_at.isoformat() + + processing_time_ms = self.processing_time_ms + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if status is not UNSET: + field_dict["status"] = status + if filename is not UNSET: + field_dict["filename"] = filename + if label is not UNSET: + field_dict["label"] = label + if language is not UNSET: + field_dict["language"] = language + if age is not UNSET: + field_dict["age"] = age + if gender is not UNSET: + field_dict["gender"] = gender + if reference_text is not UNSET: + field_dict["reference_text"] = reference_text + if audio is not UNSET: + field_dict["audio"] = audio + if summary is not UNSET: + field_dict["summary"] = summary + if details is not UNSET: + field_dict["details"] = details + if errors is not UNSET: + field_dict["errors"] = errors + if warnings is not UNSET: + field_dict["warnings"] = warnings + if pipeline_version is not UNSET: + field_dict["pipeline_version"] = pipeline_version + if processed_at is not UNSET: + field_dict["processed_at"] = processed_at + if processing_time_ms is not UNSET: + field_dict["processing_time_ms"] = processing_time_ms + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.post_voice_assessment_response_200_audio import ( + PostVoiceAssessmentResponse200Audio, + ) + from ..models.post_voice_assessment_response_200_details import ( + PostVoiceAssessmentResponse200Details, + ) + from ..models.post_voice_assessment_response_200_errors import ( + PostVoiceAssessmentResponse200Errors, + ) + from ..models.post_voice_assessment_response_200_summary import ( + PostVoiceAssessmentResponse200Summary, + ) + from ..models.post_voice_assessment_response_200_warnings_item import ( + PostVoiceAssessmentResponse200WarningsItem, + ) + + d = dict(src_dict) + status = d.pop("status", UNSET) + + filename = d.pop("filename", UNSET) + + label = d.pop("label", UNSET) + + language = d.pop("language", UNSET) + + age = d.pop("age", UNSET) + + gender = d.pop("gender", UNSET) + + reference_text = d.pop("reference_text", UNSET) + + _audio = d.pop("audio", UNSET) + audio: PostVoiceAssessmentResponse200Audio | Unset + if isinstance(_audio, Unset): + audio = UNSET + else: + audio = PostVoiceAssessmentResponse200Audio.from_dict(_audio) + + _summary = d.pop("summary", UNSET) + summary: PostVoiceAssessmentResponse200Summary | Unset + if isinstance(_summary, Unset): + summary = UNSET + else: + summary = PostVoiceAssessmentResponse200Summary.from_dict(_summary) + + _details = d.pop("details", UNSET) + details: PostVoiceAssessmentResponse200Details | Unset + if isinstance(_details, Unset): + details = UNSET + else: + details = PostVoiceAssessmentResponse200Details.from_dict(_details) + + _errors = d.pop("errors", UNSET) + errors: PostVoiceAssessmentResponse200Errors | Unset + if isinstance(_errors, Unset): + errors = UNSET + else: + errors = PostVoiceAssessmentResponse200Errors.from_dict(_errors) + + _warnings = d.pop("warnings", UNSET) + warnings: list[PostVoiceAssessmentResponse200WarningsItem] | Unset = UNSET + if _warnings is not UNSET: + warnings = [] + for warnings_item_data in _warnings: + warnings_item = PostVoiceAssessmentResponse200WarningsItem.from_dict( + warnings_item_data + ) + + warnings.append(warnings_item) + + pipeline_version = d.pop("pipeline_version", UNSET) + + _processed_at = d.pop("processed_at", UNSET) + processed_at: datetime.datetime | Unset + if isinstance(_processed_at, Unset): + processed_at = UNSET + else: + processed_at = isoparse(_processed_at) + + processing_time_ms = d.pop("processing_time_ms", UNSET) + + post_voice_assessment_response_200 = cls( + status=status, + filename=filename, + label=label, + language=language, + age=age, + gender=gender, + reference_text=reference_text, + audio=audio, + summary=summary, + details=details, + errors=errors, + warnings=warnings, + pipeline_version=pipeline_version, + processed_at=processed_at, + processing_time_ms=processing_time_ms, + ) + + post_voice_assessment_response_200.additional_properties = d + return post_voice_assessment_response_200 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_voice_assessment_response_200_audio.py b/src/vocametrix/_generated/models/post_voice_assessment_response_200_audio.py new file mode 100644 index 0000000..013122b --- /dev/null +++ b/src/vocametrix/_generated/models/post_voice_assessment_response_200_audio.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostVoiceAssessmentResponse200Audio") + + +@_attrs_define +class PostVoiceAssessmentResponse200Audio: + """object - {vowel, speech}, each {duration_seconds, sample_rate: 16000, channels: 1} or null.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_voice_assessment_response_200_audio = cls() + + post_voice_assessment_response_200_audio.additional_properties = d + return post_voice_assessment_response_200_audio + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_voice_assessment_response_200_details.py b/src/vocametrix/_generated/models/post_voice_assessment_response_200_details.py new file mode 100644 index 0000000..6bd9e66 --- /dev/null +++ b/src/vocametrix/_generated/models/post_voice_assessment_response_200_details.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostVoiceAssessmentResponse200Details") + + +@_attrs_define +class PostVoiceAssessmentResponse200Details: + """object - Raw result of every underlying measure, keyed by measure (jitter_shimmer, cpp, gne, hnr, h1_h2, formants, + spectral, voice_dynamics, gemaps, pitch, intensity, speech_percentage, speech_segments, avqi, abi, pronunciation). + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_voice_assessment_response_200_details = cls() + + post_voice_assessment_response_200_details.additional_properties = d + return post_voice_assessment_response_200_details + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_voice_assessment_response_200_errors.py b/src/vocametrix/_generated/models/post_voice_assessment_response_200_errors.py new file mode 100644 index 0000000..9517719 --- /dev/null +++ b/src/vocametrix/_generated/models/post_voice_assessment_response_200_errors.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostVoiceAssessmentResponse200Errors") + + +@_attrs_define +class PostVoiceAssessmentResponse200Errors: + """object - Failed measures: {measure: {message, status}}.""" + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_voice_assessment_response_200_errors = cls() + + post_voice_assessment_response_200_errors.additional_properties = d + return post_voice_assessment_response_200_errors + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_voice_assessment_response_200_summary.py b/src/vocametrix/_generated/models/post_voice_assessment_response_200_summary.py new file mode 100644 index 0000000..fd6bd2f --- /dev/null +++ b/src/vocametrix/_generated/models/post_voice_assessment_response_200_summary.py @@ -0,0 +1,51 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostVoiceAssessmentResponse200Summary") + + +@_attrs_define +class PostVoiceAssessmentResponse200Summary: + """object - Key results: avqi, avqi_cpps, jitter_local_percent, shimmer_local_percent, mean_f0_hz, hnr_db, cpp_db, gne, + h1_h2_db, abi, the severities (jitter, shimmer, hnr, cpp, breathiness) and abnormal_flags [{measure, severity}]. A + key is absent when its measure failed. + + """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_voice_assessment_response_200_summary = cls() + + post_voice_assessment_response_200_summary.additional_properties = d + return post_voice_assessment_response_200_summary + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_voice_assessment_response_200_warnings_item.py b/src/vocametrix/_generated/models/post_voice_assessment_response_200_warnings_item.py new file mode 100644 index 0000000..3d17659 --- /dev/null +++ b/src/vocametrix/_generated/models/post_voice_assessment_response_200_warnings_item.py @@ -0,0 +1,47 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PostVoiceAssessmentResponse200WarningsItem") + + +@_attrs_define +class PostVoiceAssessmentResponse200WarningsItem: + """ """ + + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + post_voice_assessment_response_200_warnings_item = cls() + + post_voice_assessment_response_200_warnings_item.additional_properties = d + return post_voice_assessment_response_200_warnings_item + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/vocametrix/_generated/models/post_voice_metrics_interpreter_body.py b/src/vocametrix/_generated/models/post_voice_metrics_interpreter_body.py index d9ce2a5..a33cb61 100644 --- a/src/vocametrix/_generated/models/post_voice_metrics_interpreter_body.py +++ b/src/vocametrix/_generated/models/post_voice_metrics_interpreter_body.py @@ -33,7 +33,7 @@ class PostVoiceMetricsInterpreterBody: thread_id (str | Unset): Optional. Azure AI Foundry thread ID for multi-turn continuity. praat_results (PostVoiceMetricsInterpreterBodyPraatResults | Unset): Optional. Full Praat output object — when present, the server merges F0 / expected-range fields into the metrics for richer interpretation. - email (str | Unset): Optional. Used by anonymous-key validation flow. + email (str | Unset): Optional. Used by the credit-validation flow. """ metrics: PostVoiceMetricsInterpreterBodyMetrics diff --git a/src/vocametrix/_generated/models/post_voice_metrics_interpreter_response_200.py b/src/vocametrix/_generated/models/post_voice_metrics_interpreter_response_200.py index 02f1dec..fed9399 100644 --- a/src/vocametrix/_generated/models/post_voice_metrics_interpreter_response_200.py +++ b/src/vocametrix/_generated/models/post_voice_metrics_interpreter_response_200.py @@ -39,7 +39,6 @@ class PostVoiceMetricsInterpreterResponse200: metricsProcessed, threadId, agentName, processingTimeSeconds, timestamp, genderValidation: {detectedF0, expectedRange, f0Validity, note} | null }. remaining_credits (float | Unset): Number. - is_anonymous_session (bool | Unset): Boolean — true if the call used an anonymous_ key. """ success: bool | Unset = UNSET @@ -51,7 +50,6 @@ class PostVoiceMetricsInterpreterResponse200: interpretation: PostVoiceMetricsInterpreterResponse200Interpretation | Unset = UNSET metadata: PostVoiceMetricsInterpreterResponse200Metadata | Unset = UNSET remaining_credits: float | Unset = UNSET - is_anonymous_session: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -78,8 +76,6 @@ def to_dict(self) -> dict[str, Any]: remaining_credits = self.remaining_credits - is_anonymous_session = self.is_anonymous_session - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -97,8 +93,6 @@ def to_dict(self) -> dict[str, Any]: field_dict["metadata"] = metadata if remaining_credits is not UNSET: field_dict["remaining_credits"] = remaining_credits - if is_anonymous_session is not UNSET: - field_dict["isAnonymousSession"] = is_anonymous_session return field_dict @@ -154,8 +148,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: remaining_credits = d.pop("remaining_credits", UNSET) - is_anonymous_session = d.pop("isAnonymousSession", UNSET) - post_voice_metrics_interpreter_response_200 = cls( success=success, overall_score=overall_score, @@ -164,7 +156,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: interpretation=interpretation, metadata=metadata, remaining_credits=remaining_credits, - is_anonymous_session=is_anonymous_session, ) post_voice_metrics_interpreter_response_200.additional_properties = d