Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "5.50.1",
"cliVersion": "5.50.4",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "5.14.13",
"generatorConfig": {
Expand All @@ -8,10 +8,10 @@
"enabled": true
}
},
"originGitCommit": "fbaef4c66e97232edfaacb20d23d476aa286ecdd",
"originGitCommit": "e2c477c4583f8f9e7d0d1a5b5591c1aa8cabef10",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "16.3.0"
"sdkVersion": "16.4.0"
}
18 changes: 12 additions & 6 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [16.4.0] - 2026-06-23
### Added
- **`client.voice.voice.transcribe(...)`** — new sync and async method that accepts raw audio bytes (WAV, FLAC, MP3, OGG/WebM Opus) and returns a `TranscribeResponse` with the full transcript, supporting up to ~5 minutes of audio per request.
- **`RawVoiceClient`** and **`AsyncRawVoiceClient`** — new clients under `phenoml.voice.voice` exposing `transcribe(...)` with support for `bytes`, `Iterator[bytes]`, or `AsyncIterator[bytes]` input and an optional BCP-47 `language` hint.
- **`phenoml.voice.TranscribeResponse`** — new response type with a `transcript` field returned by the transcription endpoint.
- **`phenoml.voice.errors`** — new typed error classes (`BadRequestError`, `UnauthorizedError`, `PaymentRequiredError`, `ContentTooLargeError`, `BadGatewayError`, `ServiceUnavailableError`, `GatewayTimeoutError`) raised by the voice service.

## [16.3.0] - 2026-06-18
### Added
- **`phenoml.agent.errors.ConflictError`** — new `ApiError` subclass raised by `client.agent.chat.send(...)` and `client.agent.chat.stream(...)` for HTTP 409 responses when a session already has an active turn.
Expand Down
35 changes: 33 additions & 2 deletions code-examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"metadata": {
"language": "python",
"packageName": "phenoml",
"sdkVersion": "16.3.0",
"specCommit": "fbaef4c66e97232edfaacb20d23d476aa286ecdd",
"sdkVersion": "16.4.0",
"specCommit": "e2c477c4583f8f9e7d0d1a5b5591c1aa8cabef10",
"generatorName": "fernapi/fern-python-sdk"
},
"renderRules": {
Expand Down Expand Up @@ -3986,6 +3986,37 @@
]
}
},
"POST /transcribe": {
"httpMethod": "POST",
"httpPath": "/transcribe",
"request": {
"body": null
},
"response": {
"body": null
},
"render": {
"callTemplate": "client.voice.voice.transcribe({{__body__}})",
"params": [],
"body": {
"fieldSeparator": ", ",
"fields": [
{
"jsonKey": "language",
"fieldTemplate": "language={{value}}",
"kind": "list",
"required": false,
"items": {
"jsonKey": "",
"fieldTemplate": "{{value}}",
"kind": "string",
"required": true
}
}
]
}
}
},
"GET /workflows": {
"httpMethod": "GET",
"httpPath": "/workflows",
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "phenoml"
version = "16.3.0"
version = "16.4.0"
description = ""
readme = "README.md"
authors = []
Expand Down
79 changes: 79 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6448,6 +6448,85 @@ client.tools.mcp_tools.delete(
</dl>


</dd>
</dl>
</details>

## Voice
<details><summary><code>client.voice.voice.<a href="src/phenoml/voice/voice/client.py">transcribe</a>(...) -> TranscribeResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Transcribes an uploaded audio recording and returns the transcript.
Send the raw audio bytes as the request body; the audio format is
detected automatically (WAV, FLAC, MP3, OGG/WebM Opus).

Supports up to ~5 minutes of audio per request. This limit is on audio
duration regardless of file size or format, so a compressed recording
within the size limit can still be rejected for being too long. Pair the
transcript with a downstream text step (e.g. `POST /lang2fhir/create`)
to turn it into a FHIR resource.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
client.voice.voice.transcribe(...)
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `typing.Union[bytes, typing.Iterator[bytes], typing.AsyncIterator[bytes]]` — Raw audio bytes (WAV, FLAC, MP3, or OGG/WebM Opus).

</dd>
</dl>

<dl>
<dd>

**language:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — BCP-47 language tag, repeatable for up to 4 candidate languages. Defaults to `en-US`.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
3 changes: 3 additions & 0 deletions src/phenoml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
lang2fhir,
summary,
tools,
voice,
workflows,
)
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
Expand All @@ -40,6 +41,7 @@
"lang2fhir": ".lang2fhir",
"summary": ".summary",
"tools": ".tools",
"voice": ".voice",
"workflows": ".workflows",
}

Expand Down Expand Up @@ -82,5 +84,6 @@ def __dir__():
"lang2fhir",
"summary",
"tools",
"voice",
"workflows",
]
19 changes: 19 additions & 0 deletions src/phenoml/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from .lang2fhir.client import AsyncLang2FhirClient, Lang2FhirClient
from .summary.client import AsyncSummaryClient, SummaryClient
from .tools.client import AsyncToolsClient, ToolsClient
from .voice.client import AsyncVoiceClient, VoiceClient
from .workflows.client import AsyncWorkflowsClient, WorkflowsClient


Expand Down Expand Up @@ -206,6 +207,7 @@ def __init__(
self._lang2fhir: typing.Optional[Lang2FhirClient] = None
self._summary: typing.Optional[SummaryClient] = None
self._tools: typing.Optional[ToolsClient] = None
self._voice: typing.Optional[VoiceClient] = None
self._workflows: typing.Optional[WorkflowsClient] = None

@property
Expand Down Expand Up @@ -288,6 +290,14 @@ def tools(self):
self._tools = ToolsClient(client_wrapper=self._client_wrapper)
return self._tools

@property
def voice(self):
if self._voice is None:
from .voice.client import VoiceClient # noqa: E402

self._voice = VoiceClient(client_wrapper=self._client_wrapper)
return self._voice

@property
def workflows(self):
if self._workflows is None:
Expand Down Expand Up @@ -492,6 +502,7 @@ def __init__(
self._lang2fhir: typing.Optional[AsyncLang2FhirClient] = None
self._summary: typing.Optional[AsyncSummaryClient] = None
self._tools: typing.Optional[AsyncToolsClient] = None
self._voice: typing.Optional[AsyncVoiceClient] = None
self._workflows: typing.Optional[AsyncWorkflowsClient] = None

@property
Expand Down Expand Up @@ -574,6 +585,14 @@ def tools(self):
self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
return self._tools

@property
def voice(self):
if self._voice is None:
from .voice.client import AsyncVoiceClient # noqa: E402

self._voice = AsyncVoiceClient(client_wrapper=self._client_wrapper)
return self._voice

@property
def workflows(self):
if self._workflows is None:
Expand Down
4 changes: 2 additions & 2 deletions src/phenoml/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "phenoml/16.3.0",
"User-Agent": "phenoml/16.4.0",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "phenoml",
"X-Fern-SDK-Version": "16.3.0",
"X-Fern-SDK-Version": "16.4.0",
**(self.get_custom_headers() or {}),
}
token = self._get_token()
Expand Down
Loading