From ddc59717db0113e929fa47c49fcbca37e34ab926 Mon Sep 17 00:00:00 2001 From: James Walker Date: Fri, 6 Mar 2026 12:03:57 +0000 Subject: [PATCH 1/3] initial commit, change python code and layout to focus on Python --- .../assets/speechmatics-batch-quickstart.py | 20 +++++++++++++ docs/speech-to-text/batch/quickstart.mdx | 30 +++++++++++-------- 2 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py diff --git a/docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py b/docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py new file mode 100644 index 00000000..d5a2d4e6 --- /dev/null +++ b/docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py @@ -0,0 +1,20 @@ +import asyncio +from speechmatics.batch import AsyncClient, TranscriptionConfig + +API_KEY = "YOUR_API_KEY" +AUDIO_FILE= "example.wav" + +config = TranscriptionConfig( + diarization="speaker" +) + +async def main(): + client = AsyncClient(api_key=API_KEY) + result = await client.transcribe( + audio_file=AUDIO_FILE, + transcription_config=config + ) + print(result.transcript_text) + await client.close() + +asyncio.run(main()) \ No newline at end of file diff --git a/docs/speech-to-text/batch/quickstart.mdx b/docs/speech-to-text/batch/quickstart.mdx index e0b7a6a6..02a95623 100644 --- a/docs/speech-to-text/batch/quickstart.mdx +++ b/docs/speech-to-text/batch/quickstart.mdx @@ -18,7 +18,7 @@ import transcriptResponseSchema from "!openapi-schema-loader!@site/spec/batch.ya import { HelpCircle, BookOpen, FileAudio } from "lucide-react" import jsQuickstart from "./assets/file-transcription-quickstart.example.js?raw" -import pythonQuickstart from "./assets/file-transcription-quickstart.py" +import pythonQuickstart from "./assets/speechmatics-batch-quickstart.py" import transcriptResponseExample from "./assets/transcript-response-example.json?raw" # Quickstart @@ -42,19 +42,19 @@ Enterprise customers may need to speak to [Support](https://support.speechmatics ### 2. Pick and install a library -Check out our [JavaScript client](https://www.npmjs.com/package/@speechmatics/batch-client) or [Python client](https://pypi.org/project/speechmatics-python/) to get started. +Check out our [Batch Python client](https://github.com/speechmatics/speechmatics-python-sdk) or [JavaScript client](https://www.npmjs.com/package/@speechmatics/batch-client) to get started. - - Install using NPM: + + Install using pip: ``` - npm install @speechmatics/batch-client + pip install speechmatics-batch ``` - - Install using pip: + + Install using NPM: ``` - pip3 install speechmatics-python + npm install @speechmatics/batch-client ``` @@ -68,6 +68,15 @@ Download and save our [example.wav](https://github.com/speechmatics/speechmatics Paste your API key into `YOUR_API_KEY` in the code below. + + + {pythonQuickstart} + + You should see the following output: + ``` + SPEAKER S1: Welcome to Speechmatics. We're delighted that you've decided to try our speech to text software to get going. Just create an API key and submit a transcription request to our API. We hope you'll be very impressed by the results. Thank you. + ``` + {jsQuickstart} @@ -79,11 +88,6 @@ Paste your API key into `YOUR_API_KEY` in the code below. Welcome to Speechmatics . We're delighted that you've decided to try our speech to text software to get going . Just create an API key and submit a transcription request to our API . We hope you'll be very impressed by the results . Thank you . ``` - - - {pythonQuickstart} - - From 70afc49a14995563abaac380069ffe8ecbe36fc0 Mon Sep 17 00:00:00 2001 From: James Walker Date: Tue, 10 Mar 2026 11:06:05 +0000 Subject: [PATCH 2/3] Add newline --- .../batch/assets/speechmatics-batch-quickstart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py b/docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py index d5a2d4e6..806b2fb6 100644 --- a/docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py +++ b/docs/speech-to-text/batch/assets/speechmatics-batch-quickstart.py @@ -17,4 +17,4 @@ async def main(): print(result.transcript_text) await client.close() -asyncio.run(main()) \ No newline at end of file +asyncio.run(main()) From 3614f4920bf748994330652b30ed49f63490f3e7 Mon Sep 17 00:00:00 2001 From: James Walker Date: Tue, 10 Mar 2026 11:33:06 +0000 Subject: [PATCH 3/3] Move complicated output and add next steps section --- docs/speech-to-text/batch/output.mdx | 41 ++++++++++++++ docs/speech-to-text/batch/quickstart.mdx | 69 +++++++++++------------- 2 files changed, 73 insertions(+), 37 deletions(-) diff --git a/docs/speech-to-text/batch/output.mdx b/docs/speech-to-text/batch/output.mdx index e68c5e1f..fb35a7af 100644 --- a/docs/speech-to-text/batch/output.mdx +++ b/docs/speech-to-text/batch/output.mdx @@ -11,6 +11,10 @@ import HTTPMethodBadge from '@site/src/theme/HTTPMethodBadge' import checkJobStatusUnixSample from './assets/check-job-status.sh' import checkMultipleJobsStatusUnixSample from './assets/check-multiple-jobs-status.sh' import batchSchema from "!openapi-schema-loader!@site/spec/batch.yaml" +import transcriptResponseExample from "./assets/transcript-response-example.json?raw" +import { HelpCircle, BookOpen, FileAudio } from "lucide-react" +import { Card, Link, Text, Flex, Button, Box, Grid } from '@radix-ui/themes' +import { LinkCard } from "@site/src/theme/LinkCard"; # Output @@ -118,6 +122,43 @@ Please refer to our [API Reference](/api-ref/batch/get-the-transcript-for-a-tran +### Example response + +The following is an example of a transcript response, which you should see as an output of the provided [example.wav](https://github.com/speechmatics/speechmatics-js-sdk/raw/7d219bfee9166736e6aa21598535a194387b84be/examples/nodejs/example.wav) file used in the [code samples in the quickstart](/speech-to-text/batch/quickstart). + + + {JSON.stringify(transcriptResponseExample, null, 2)} + + +## Quicklinks + + + } + /> + } + /> + } + /> + } + /> + + ## Tracking metadata You can optionally add tracking metadata to a job when you create it. This can be used for tracking the job through your own management workflow. diff --git a/docs/speech-to-text/batch/quickstart.mdx b/docs/speech-to-text/batch/quickstart.mdx index 02a95623..011c4ec8 100644 --- a/docs/speech-to-text/batch/quickstart.mdx +++ b/docs/speech-to-text/batch/quickstart.mdx @@ -15,11 +15,10 @@ import CodeBlock from '@theme/CodeBlock' import { LinkCard } from "@site/src/theme/LinkCard"; import SchemaNode from "@theme/Schema"; import transcriptResponseSchema from "!openapi-schema-loader!@site/spec/batch.yaml" -import { HelpCircle, BookOpen, FileAudio } from "lucide-react" +import { HelpCircle, BookOpen, FileAudio, Users, Sparkles, Layers, BarChart2, BookMarked, Languages } from "lucide-react" import jsQuickstart from "./assets/file-transcription-quickstart.example.js?raw" import pythonQuickstart from "./assets/speechmatics-batch-quickstart.py" -import transcriptResponseExample from "./assets/transcript-response-example.json?raw" # Quickstart @@ -90,49 +89,45 @@ Paste your API key into `YOUR_API_KEY` in the code below. +### Next Steps -### Transcript response schema - -The transcript includes information about the job and metadata such as the transcription configuration that was used. - -Please refer to our [API Reference](/api-ref/batch/get-the-transcript-for-a-transcription-job#responses) for full details about the transcript contents. - - - - -### Example response - -The following is an example of a transcript response, which you should see as an output of the provided [example.wav](https://github.com/speechmatics/speechmatics-js-sdk/raw/7d219bfee9166736e6aa21598535a194387b84be/examples/nodejs/example.wav) file used in the [code samples above](#4-insert-api-key). - - - {JSON.stringify(transcriptResponseExample, null, 2)} - - -## Quicklinks +Now that you have a basic transcription working, explore these features to get more out of your audio. } + title="Speaker Diarization" + description="Identify who said what by labeling each speaker in your transcript" + href="/speech-to-text/batch/batch-diarization" + icon={} + /> + } + /> + } /> } + title="Sentiment Analysis" + description="Detect the sentiment and emotional tone within your transcripts" + href="/speech-to-text/batch/speech-intelligence/sentiment-analysis" + icon={} /> } + title="Auto Chapters" + description="Segment long transcripts into meaningful, titled chapters" + href="/speech-to-text/batch/speech-intelligence/auto-chapters" + icon={} /> } + title="Translation" + description="Translate your transcripts into other languages automatically" + href="/speech-to-text/features/translation" + icon={} /> - \ No newline at end of file +