Speechmatics.Transcribe
2.0.0
dotnet add package Speechmatics.Transcribe --version 2.0.0
NuGet\Install-Package Speechmatics.Transcribe -Version 2.0.0
<PackageReference Include="Speechmatics.Transcribe" Version="2.0.0" />
<PackageVersion Include="Speechmatics.Transcribe" Version="2.0.0" />
<PackageReference Include="Speechmatics.Transcribe" />
paket add Speechmatics.Transcribe --version 2.0.0
#r "nuget: Speechmatics.Transcribe, 2.0.0"
#:package Speechmatics.Transcribe@2.0.0
#addin nuget:?package=Speechmatics.Transcribe&version=2.0.0
#tool nuget:?package=Speechmatics.Transcribe&version=2.0.0
Speechmatics.Transcribe - the C# library for the Speechmatics ASR REST API
The Speechmatics Automatic Speech Recognition REST API is used to submit ASR jobs and receive the results. The supported job types are transcription of audio files, and alignment of audio files with existing transcripts to add word or line timings.
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 2.0.0
- SDK version: 1.0.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
Frameworks supported
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
Dependencies
- RestSharp - 105.1.0 or later
- Json.NET - 13.0.0 or later
- JsonSubTypes - 2.0.1 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
Installation
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using Speechmatics.Transcribe.Api;
using Speechmatics.Transcribe.Client;
using Speechmatics.Transcribe.Model;
Packaging
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out Speechmatics.Transcribe.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
Getting Started
using System;
using System.IO;
using Speechmatics.Transcribe.Api;
using Speechmatics.Transcribe.Client;
namespace SwaggerDemo
{
class Program
{
static void Main(string[] args)
{
var c = new Configuration();
c.AddDefaultHeader("Authorization", "Bearer -");
c.BasePath = "https://asr.api.speechmatics.com/v2";
var api = new DefaultApi(c);
var jobId = "";
using (var s = File.OpenRead(@"short_text.wav"))
{
var answer = api.JobsPost("{\"type\":\"transcription\", \"transcription_config\":{\"language\":\"en\"}}", s);
Console.WriteLine($"Job created with id {answer.Id}");
jobId = answer.Id;
}
var job = api.JobsJobidGet(jobId);
Console.WriteLine(job);
Console.ReadLine();
}
}
}
Documentation for API Endpoints
All URIs are relative to http://localhost/v2
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | JobidAlignmentGet | GET /{jobid}/alignment | Get the aligned text file for an alignment job. |
DefaultApi | JobsGet | GET /jobs | List all jobs. |
DefaultApi | JobsJobidDataGet | GET /jobs/{jobid}/data | Get the data file used as input to a job. |
DefaultApi | JobsJobidDelete | DELETE /jobs/{jobid} | Delete a job and remove all associated resources. |
DefaultApi | JobsJobidGet | GET /jobs/{jobid} | Get job details, including progress and any error reports. |
DefaultApi | JobsJobidTextGet | GET /jobs/{jobid}/text | Get the text file used as input to an alignment job. |
DefaultApi | JobsJobidTranscriptGet | GET /jobs/{jobid}/transcript | Get the transcript for a transcription job. |
DefaultApi | JobsPost | POST /jobs | Create a new job. |
Documentation for Models
- Model.AlignmentConfig
- Model.CreateJobResponse
- Model.DataFetchConfig
- Model.DeleteJobResponse
- Model.ErrorResponse
- Model.JobConfig
- Model.JobDetails
- Model.JobInfo
- Model.NotificationConfig
- Model.RecognitionAlternative
- Model.RecognitionDisplay
- Model.RecognitionMetadata
- Model.RecognitionResult
- Model.RetrieveJobResponse
- Model.RetrieveJobsResponse
- Model.RetrieveTranscriptResponse
- Model.TrackingData
- Model.TranscriptionConfig
- Model.TranscriptionConfigAdditionalVocab
- Model.TranscriptionConfigPunctuationOverrides
Documentation for Authorization
All endpoints do not require authorization.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.5
- JsonSubTypes (>= 2.0.1)
- NewtonSoft.Json (>= 13.0.0)
- RestSharp (>= 105.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.