Git Product home page Git Product logo

speech-api-reference-implementation's Introduction

Medallia Speech API

Objective

This application is a reference implementation for how to publish voice recordings and other speech-related data to Medallia Experience Cloud (MEC) using the Medallia Speech API.

Theory of Operation

This process occurs in two stages:

  1. Transfer the recording file to the Medallia Media File Transfer (MMFT) server; and

  2. Publish the recording metadata to the Medallia Speech API to begin processing.

Both stages can be executed using parallel workers and have a maximum execution time enforced.

Compile

This program was written to compile and run using AdoptOpenJDK 16. Please install and configure it on your system before proceeding.

Run the following commands:

./compile.sh

Usage

The below examples use environment variables to mask sensitive information. Contact your Medallia representative to obtain the following details before proceeding:

  • The MMFT endpoint
  • The MMFT access and secret keys
  • The MMFT bucket name
  • The MEC OAuth 2.0 client id and secret
  • The MEC OAuth 2.0 token URL
  • The Medallia Speech API URL via the Medallia API Gateway

Online Help

Once compiled, run ./run.sh --help to see the usage screen and common arguments:

Image of Top-Level Help Prompt

You can further explore each subcommand's help using ./run.sh [command] --help, where [command] is one of the commands listed at the bottom of the first usage screen shown:

Image of Transfer Help Prompt

Transferring Recordings to MMFT

This application is capable of transferring recordings to MMFT from a source of either an SFTP or a local directory.

The following shows how to transfer data from a local directory:

./run.sh transfer \
    --folder=./sample-recordings \
    --glob="*.wav" \
    --mmft-endpoint=${MMFT_ENDPOINT_URL} \
    --mmft-access-key=${MMFT_ACCESS_KEY} \
    --mmft-secret-key=${MMFT_SECRET_KEY} \
    --mmft-bucket=${MMFT_BUCKET}

Image of Transferring from a Local Source

The following shows how to transfer data from a SFTP source:

./run.sh transfer \
    --sftp-folder=sample-recordings \
    --sftp-host=${SFTP_HOST} \
    --sftp-username=${SFTP_USERNAME} \
    --sftp-password=${SFTP_PASSWORD} \
    --output=files-transferred.txt \
    --mmft-endpoint=${MMFT_ENDPOINT_URL} \
    --mmft-access-key=${MMFT_ACCESS_KEY} \
    --mmft-secret-key=${MMFT_SECRET_KEY} \
    --mmft-bucket=${MMFT_BUCKET}

Image of Transferring from a SFTP Source

Publishing Metadata to Medallia Speech

The Medallia Speech API accepts metadata in JSON format, but this application accepts metadata in either JSON or CSV format, converting as needed.

./run.sh publish \
    --data=metadata.csv \
    --api-gateway=${MEC_API_GATEWAY} \
    --client-id=${MEC_OAUTH_CLIENT_ID} \
    --client-secret=${MEC_OAUTH_CLIENT_SECRET} \
    --token-url=${MEC_OAUTH_TOKEN_URL}

Image of Publishing Metadata

License

Copyright 2021. Medallia, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

speech-api-reference-implementation's People

Contributors

cverges-medallia avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.