2.0.1 • Published 3 years ago

speechtotextapiv30 v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

SpeechToTextApiV30

SpeechToTextApiV30 - JavaScript client for SpeechToTextApiV30 Speech to Text API v3.0. This SDK is automatically generated by the Swagger Codegen project:

  • API version: v3.0
  • Package version: v3.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install SpeechToTextApiV30 --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your SpeechToTextApiV30 from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('SpeechToTextApiV30') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/SpeechToTextApiV30 then install it via:

    npm install YOUR_USERNAME/SpeechToTextApiV30 --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var SpeechToTextApiV30 = require('SpeechToTextApiV30');

var defaultClient = SpeechToTextApiV30.ApiClient.instance;

// Configure API key authorization: apiKeyHeader
var apiKeyHeader = defaultClient.authentications['apiKeyHeader'];
apiKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyHeader.apiKeyPrefix['Ocp-Apim-Subscription-Key'] = "Token"

// Configure API key authorization: apiKeyQuery
var apiKeyQuery = defaultClient.authentications['apiKeyQuery'];
apiKeyQuery.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyQuery.apiKeyPrefix['subscription-key'] = "Token"

var api = new SpeechToTextApiV30.DefaultApi()

var id = "id_example"; // {String} Format - uuid. The identifier of the model that will be copied.

var opts = { 
  'modelCopy': new SpeechToTextApiV30.ModelCopy() // {ModelCopy} The body contains the subscription key of the target subscription.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.copyModelToSubscription(id, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://westus.api.cognitive.microsoft.com/speechtotext/v3.0

ClassMethodHTTP requestDescription
SpeechToTextApiV30.DefaultApicopyModelToSubscriptionPOST /models/{id}/copytoCopy Model
SpeechToTextApiV30.DefaultApicreateDatasetPOST /datasetsCreate Dataset
SpeechToTextApiV30.DefaultApicreateEndpointPOST /endpointsCreate Endpoint
SpeechToTextApiV30.DefaultApicreateEvaluationPOST /evaluationsCreate Evaluation
SpeechToTextApiV30.DefaultApicreateHookPOST /webhooksCreate Web Hook
SpeechToTextApiV30.DefaultApicreateModelPOST /modelsCreate Model
SpeechToTextApiV30.DefaultApicreateProjectPOST /projectsCreate Project
SpeechToTextApiV30.DefaultApicreateTranscriptionPOST /transcriptionsCreate Transcription
SpeechToTextApiV30.DefaultApideleteBaseModelLogDELETE /endpoints/base/{locale}/files/logs/{logId}Delete Base Model Endpoint Log
SpeechToTextApiV30.DefaultApideleteBaseModelLogsDELETE /endpoints/base/{locale}/files/logsDelete All Base Model Endpoint Logs
SpeechToTextApiV30.DefaultApideleteDatasetDELETE /datasets/{id}Delete Dataset
SpeechToTextApiV30.DefaultApideleteEndpointDELETE /endpoints/{id}Delete Endpoint
SpeechToTextApiV30.DefaultApideleteEndpointLogDELETE /endpoints/{id}/files/logs/{logId}Delete Custom Model Endpoint Log
SpeechToTextApiV30.DefaultApideleteEndpointLogsDELETE /endpoints/{id}/files/logsDelete All Custom Model Endpoint Logs
SpeechToTextApiV30.DefaultApideleteEvaluationDELETE /evaluations/{id}Delete Evaluation
SpeechToTextApiV30.DefaultApideleteHookDELETE /webhooks/{id}Delete Web Hook
SpeechToTextApiV30.DefaultApideleteModelDELETE /models/{id}Delete Model
SpeechToTextApiV30.DefaultApideleteProjectDELETE /projects/{id}Delete Project
SpeechToTextApiV30.DefaultApideleteTranscriptionDELETE /transcriptions/{id}Delete Transcription
SpeechToTextApiV30.DefaultApigetBaseModelGET /models/base/{id}Get Base Model
SpeechToTextApiV30.DefaultApigetBaseModelLogGET /endpoints/base/{locale}/files/logs/{logId}Get Base Model Endpoint Log
SpeechToTextApiV30.DefaultApigetBaseModelLogsGET /endpoints/base/{locale}/files/logsGet Base Model Endpoint Logs
SpeechToTextApiV30.DefaultApigetBaseModelManifestGET /models/base/{id}/manifestGet Base Model Manifest
SpeechToTextApiV30.DefaultApigetBaseModelsGET /models/baseGet Base Models
SpeechToTextApiV30.DefaultApigetDatasetGET /datasets/{id}Get Dataset
SpeechToTextApiV30.DefaultApigetDatasetFileGET /datasets/{id}/files/{fileId}Get Dataset File
SpeechToTextApiV30.DefaultApigetDatasetFilesGET /datasets/{id}/filesGet Dataset Files
SpeechToTextApiV30.DefaultApigetDatasetsGET /datasetsGet Datasets
SpeechToTextApiV30.DefaultApigetDatasetsForProjectGET /projects/{id}/datasetsGet Datasets for Project
SpeechToTextApiV30.DefaultApigetEndpointGET /endpoints/{id}Get Endpoint
SpeechToTextApiV30.DefaultApigetEndpointLogGET /endpoints/{id}/files/logs/{logId}Get Custom Model Endpoint Log
SpeechToTextApiV30.DefaultApigetEndpointLogsGET /endpoints/{id}/files/logsGet Custom Model Endpoint Logs
SpeechToTextApiV30.DefaultApigetEndpointsGET /endpointsGet Endpoints
SpeechToTextApiV30.DefaultApigetEndpointsForProjectGET /projects/{id}/endpointsGet Endpoints for Project
SpeechToTextApiV30.DefaultApigetEvaluationGET /evaluations/{id}Get Evaluation
SpeechToTextApiV30.DefaultApigetEvaluationFileGET /evaluations/{id}/files/{fileId}Get Evaluation File
SpeechToTextApiV30.DefaultApigetEvaluationFilesGET /evaluations/{id}/filesGet Evaluation Files
SpeechToTextApiV30.DefaultApigetEvaluationsGET /evaluationsGet Evaluations
SpeechToTextApiV30.DefaultApigetEvaluationsForProjectGET /projects/{id}/evaluationsGet Evaluations for Project
SpeechToTextApiV30.DefaultApigetHealthStatusGET /healthstatusGet Health Status
SpeechToTextApiV30.DefaultApigetHookGET /webhooks/{id}Get Web Hook
SpeechToTextApiV30.DefaultApigetHooksGET /webhooksGet Web Hooks
SpeechToTextApiV30.DefaultApigetModelGET /models/{id}Get Model
SpeechToTextApiV30.DefaultApigetModelManifestGET /models/{id}/manifestGet Custom Model Manifest
SpeechToTextApiV30.DefaultApigetModelsGET /modelsGet Custom Models
SpeechToTextApiV30.DefaultApigetModelsForProjectGET /projects/{id}/modelsGet Models for Project
SpeechToTextApiV30.DefaultApigetProjectGET /projects/{id}Get Project
SpeechToTextApiV30.DefaultApigetProjectsGET /projectsGet Projects
SpeechToTextApiV30.DefaultApigetSupportedLocalesForDatasetsGET /datasets/localesGet Supported Locales for Datasets
SpeechToTextApiV30.DefaultApigetSupportedLocalesForEndpointsGET /endpoints/localesGet Supported Locales for Endpoints
SpeechToTextApiV30.DefaultApigetSupportedLocalesForEvaluationsGET /evaluations/localesGet Supported Locales for Evaluations
SpeechToTextApiV30.DefaultApigetSupportedLocalesForModelsGET /models/localesGet Supported Locales for Models
SpeechToTextApiV30.DefaultApigetSupportedLocalesForTranscriptionsGET /transcriptions/localesGet Supported Locales for Transcriptions
SpeechToTextApiV30.DefaultApigetSupportedProjectLocalesGET /projects/localesGet Supported Locales for Projects
SpeechToTextApiV30.DefaultApigetTranscriptionGET /transcriptions/{id}Get Transcription
SpeechToTextApiV30.DefaultApigetTranscriptionFileGET /transcriptions/{id}/files/{fileId}Get Transcription File
SpeechToTextApiV30.DefaultApigetTranscriptionFilesGET /transcriptions/{id}/filesGet Transcription Files
SpeechToTextApiV30.DefaultApigetTranscriptionsGET /transcriptionsGet Transcriptions
SpeechToTextApiV30.DefaultApigetTranscriptionsForProjectGET /projects/{id}/transcriptionsGet Transcriptions for Project
SpeechToTextApiV30.DefaultApipingHookPOST /webhooks/{id}/pingPing Web Hook
SpeechToTextApiV30.DefaultApitestHookPOST /webhooks/{id}/testTest Web Hook
SpeechToTextApiV30.DefaultApiupdateDatasetPATCH /datasets/{id}Update Dataset
SpeechToTextApiV30.DefaultApiupdateEndpointPATCH /endpoints/{id}Update Endpoint
SpeechToTextApiV30.DefaultApiupdateEvaluationPATCH /evaluations/{id}Update Evaluation
SpeechToTextApiV30.DefaultApiupdateHookPATCH /webhooks/{id}Update Web Hook
SpeechToTextApiV30.DefaultApiupdateModelPATCH /models/{id}Update Model
SpeechToTextApiV30.DefaultApiupdateProjectPATCH /projects/{id}Update Project
SpeechToTextApiV30.DefaultApiupdateTranscriptionPATCH /transcriptions/{id}Update Transcription
SpeechToTextApiV30.DefaultApiuploadDatasetFromFormPOST /datasets/uploadCreate Dataset from Form

Documentation for Models

Documentation for Authorization

apiKeyHeader

  • Type: API key
  • API key parameter name: Ocp-Apim-Subscription-Key
  • Location: HTTP header

apiKeyQuery

  • Type: API key
  • API key parameter name: subscription-key
  • Location: URL query string