# Speech

## Retrieves speech transcription jobs for the current user.

> Returns user-owned speech records ordered by creation date.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/Speech/Get":{"get":{"tags":["Speech"],"summary":"Retrieves speech transcription jobs for the current user.","description":"Returns user-owned speech records ordered by creation date.","responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Retrieves a speech transcription job by identifier.

> Validates company-based access before returning speech metadata.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/Speech/Get/{speechId}":{"get":{"tags":["Speech"],"summary":"Retrieves a speech transcription job by identifier.","description":"Validates company-based access before returning speech metadata.","parameters":[{"name":"speechId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Creates a speech transcription job from a media file.

> Starts transcription for supported media types and stores job metadata for later processing.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/Speech/Create/{mediaId}":{"get":{"tags":["Speech"],"summary":"Creates a speech transcription job from a media file.","description":"Starts transcription for supported media types and stores job metadata for later processing.","parameters":[{"name":"mediaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Updates speech metadata.

> Applies editable fields such as transcript display filename.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateSpeechViewModel":{"required":["fileName"],"type":"object","properties":{"fileName":{"type":"string","description":"Updated display filename for the speech/transcript entry."}},"description":"Represents editable fields for updating a speech transcription entry."}}},"paths":{"/v1/Speech/Update/{speechId}":{"post":{"tags":["Speech"],"summary":"Updates speech metadata.","description":"Applies editable fields such as transcript display filename.","parameters":[{"name":"speechId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSpeechViewModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSpeechViewModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSpeechViewModel"}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Deletes a speech transcription job and related files.

> Removes the speech record and associated media artifacts when present.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/Speech/Delete/{speechId}":{"delete":{"tags":["Speech"],"summary":"Deletes a speech transcription job and related files.","description":"Removes the speech record and associated media artifacts when present.","parameters":[{"name":"speechId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Retrieves detected speakers from a transcript.

> Extracts speaker identifiers and candidate offsets from a transcript that is ready for speaker annotation.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/v1/Speech/GetSpeakers/{speechId}":{"get":{"tags":["Speech"],"summary":"Retrieves detected speakers from a transcript.","description":"Extracts speaker identifiers and candidate offsets from a transcript that is ready for speaker annotation.","parameters":[{"name":"speechId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Applies speaker names to a transcript.

> Rewrites transcript speaker labels, stores an updated transcript file, and marks the speech job as completed.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"SpeechSpeakerDTO":{"required":["speakerId","speakerName","offsets"],"type":"object","properties":{"speakerId":{"type":"string","description":"Transcript speaker identifier to be renamed."},"speakerName":{"type":"string","description":"Display name to assign to the speaker identifier."},"offsets":{"type":"array","items":{"type":"string"},"description":"Candidate transcript offsets for this speaker, ordered by descending spoken segment length."}},"description":"Represents speaker mapping data used to label transcript speakers."}}},"paths":{"/v1/Speech/SetSpeakers/{speechId}":{"post":{"tags":["Speech"],"summary":"Applies speaker names to a transcript.","description":"Rewrites transcript speaker labels, stores an updated transcript file, and marks the speech job as completed.","parameters":[{"name":"speechId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpeechSpeakerDTO"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpeechSpeakerDTO"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpeechSpeakerDTO"}}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Generates a document from a speech transcript.

> Uses prompt instructions and optional document template to generate output content from transcript data.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ExecuteSpeechViewModel":{"required":["prompt"],"type":"object","properties":{"documentTemplateId":{"type":"string","description":"Optional document template identifier used for output formatting.","format":"uuid","nullable":true},"prompt":{"type":"string","description":"Prompt instruction used during document generation."},"transcript":{"type":"boolean","description":"Indicates whether transcript content should be included in generated output."}},"description":"Represents options for generating a document from a speech transcript."}}},"paths":{"/v1/Speech/Execute/{speechId}":{"post":{"tags":["Speech"],"summary":"Generates a document from a speech transcript.","description":"Uses prompt instructions and optional document template to generate output content from transcript data.","parameters":[{"name":"speechId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteSpeechViewModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/ExecuteSpeechViewModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ExecuteSpeechViewModel"}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```

## Transcribes an uploaded WAV-compatible audio file.

> Converts incoming audio to the required format and returns the transcript text.

```json
{"openapi":"3.0.1","info":{"title":"WebApi | v1","version":"1.0.0"},"tags":[{"name":"Speech"}],"servers":[{"url":"https://api.safegpt.nl/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"JWT bearer token. Example: 'Bearer {token}'.","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"IFormFile":{"type":"string","format":"binary"}}},"paths":{"/v1/Speech/SpeechToText":{"post":{"tags":["Speech"],"summary":"Transcribes an uploaded WAV-compatible audio file.","description":"Converts incoming audio to the required format and returns the transcript text.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"wavFile":{"$ref":"#/components/schemas/IFormFile"}}}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"description":"Authentication is required."},"403":{"description":"The user is not authorized to access this endpoint."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.safegpt.nl/api-en/endpoints/speech.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
