A plugin for IVR Tester to transcribe IVR call flows using Google Speech-to-Text.
Install using yarn:
yarn add ivr-tester-transcriber-google-speech-to-text
Or npm:
npm install ivr-tester-transcriber-google-speech-to-text
Follow GCP's quick-start guide to:
- Setup a Google Cloud project
- Enable the Google Speech-to-Text service
- Create a service account
- Create then download a JSON key-file for the service account
- Set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of the JSON key-file
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
See the API's documentation for details of each parameter.
import { googleSpeechToText } from "ivr-tester-transcriber-google-speech-to-text";
const config: Config = {
transcriber: googleSpeechToText({ languageCode: "en-GB" })
};
The plugin exposes two properties that allow you to improve the accuracy of transcriptions:
useEnhanced
- Whether to use an enhanced model for speech recognition if it is available for the language code provided. Beware this costs more!speechPhrases
- Allows you to specify specific words or phrases used more frequently within the speech. See Google's guide for more info on what to provide.
import { googleSpeechToText } from "ivr-tester-transcriber-google-speech-to-text";
const config: Config = {
transcriber: googleSpeechToText(
{
languageCode: "en-GB",
useEnhanced: true,
speechPhrases: ["balance", "costing", "financial services"]
}
),
};
Console logging can be enabled by specifying the
package name in the DEBUG
environment variable:
DEBUG=ivr-tester-transcriber-google-speech-to-text
DEBUG_DEPTH=5