Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Version 2024-11-13, incl paginated voices endpoint #82

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions .github/workflows/preview-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
fern generate --group ts-sdk --preview --log-level debug
fern generate --group ts-sdk --preview --log-level debug --api version-2024-11-13

- name: Compile
env:
Expand All @@ -32,7 +32,7 @@ jobs:
cd fern/.preview/fern-typescript-node-sdk
yarn install
yarn build


preview-python:
runs-on: ubuntu-latest
Expand All @@ -46,12 +46,12 @@ jobs:
- name: Download Fern
run: npm install -g fern-api

- name: Preview Python SDK
- name: Preview Python SDK
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
fern generate --group python-sdk --preview --log-level debug
fern generate --group python-sdk --preview --log-level debug --api version-2024-11-13

- name: Set up python
uses: actions/setup-python@v4
with:
Expand All @@ -62,7 +62,7 @@ jobs:
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1

- name: Compile
run: |
run: |
cd fern/.preview/fern-python-sdk
poetry install
poetry install
poetry run mypy .
2 changes: 1 addition & 1 deletion .github/workflows/release-py-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
fern generate --group python-sdk --version ${{ inputs.version }} --log-level debug
fern generate --group python-sdk --version ${{ inputs.version }} --log-level debug --api version-2024-11-13
2 changes: 1 addition & 1 deletion .github/workflows/release-ts-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
fern generate --group ts-sdk --version ${{ inputs.version }} --log-level debug
fern generate --group ts-sdk --version ${{ inputs.version }} --log-level debug --api version-2024-11-13
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,25 @@ service:
request: MixVoicesRequest
response: EmbeddingResponse

cloneFromClip:
path: /clone/clip
method: POST
display-name: Clone Voice from Clip
docs: |
Clone a voice from a clip. The clip should be a 15-20 second recording of a person speaking with little to no background noise.
The endpoint will return an embedding that can either be used directly with text-to-speech endpoints or used to create a new voice.
request:
name: CloneFromClipRequest
body:
properties:
clip:
type: file
enhance:
type: boolean
docs: |
Whether to enhance the clip to improve its quality before cloning. Useful if the clip is low quality.
response: EmbeddingResponse

clone:
path: /clone
method: POST
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions fern/apis/version-2024-11-13/definition/api-status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

types:
APIInfo:
properties:
ok: boolean
version: string

service:
base-path: ""
auth: false
endpoints:
get:
path: /
method: GET
display-name: API Status and Version
response: APIInfo
14 changes: 14 additions & 0 deletions fern/apis/version-2024-11-13/definition/api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: cartesia
display-name: Cartesia API
auth: APIKeyHeader
auth-schemes:
APIKeyHeader:
header: X-API-Key
type: string
name: apiKey
headers:
Cartesia-Version:
type: literal<"2024-11-13">
environments:
Production: https://api.cartesia.ai
default-environment: Production
66 changes: 66 additions & 0 deletions fern/apis/version-2024-11-13/definition/datasets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
types:
Dataset:
properties:
id: string
name: string
created_at: string

CreateDatasetRequest:
properties:
name: string

DatasetFile:
properties:
id: string
filename: string
created_at: string

FilePurpose:
enum:
- fine_tune

PaginatedDatasets:
properties:
data: list<Dataset>
has_more: boolean

PaginatedDatasetFiles:
properties:
data: list<DatasetFile>
has_more: boolean

service:
base-path: /datasets
auth: true
endpoints:
list:
path: /
method: GET
response: PaginatedDatasets

create:
path: /
method: POST
request: CreateDatasetRequest
response: Dataset

listFiles:
path: /{id}/files
method: GET
path-parameters:
id: string
response: PaginatedDatasetFiles

uploadFile:
path: /{id}/files
method: POST
path-parameters:
id: string
request:
name: UploadDatasetFileRequest
body:
properties:
file:
type: file
purpose:
type: FilePurpose
203 changes: 203 additions & 0 deletions fern/apis/version-2024-11-13/definition/embedding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json

types:
Embedding:
type: list<double>
docs: |
A 192-dimensional vector (i.e. a list of 192 numbers) that represents the voice.
examples:
- value:
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
]
Loading
Loading