Getting Started with Yactraq

Yactraq Speech2Topics is a service that provides topic information from automatically analyzing the speech content of online audio and video sources.

Once you have subscribed to the Yactraq API, you are ready to use Mashape/Yactraq to process online audio/video. Let's assume that you have a source you are interested in (e.g. http://www.youtube.com/watch?v=NBuLeA7nNFk) then a call to "stream" will give you complete access to the power of Yactraq.

Notes

  • Unless the start parameter is non-zero, no new processing will be initiated, the stream call will simply look for an existing result for that stream.
  • If you would like an accompanying transcript of the speech content of the URL, set the tx parameter to 1. The transcript consists of an array of objects with the properties: w for the word, p for the confidence in the word recognition (0-1), and ts the timestamp of the word expressed in seconds from the start of the stream.
  • The topics returned for the stream (once the status value is "processed") consist of an array of objects with the properties: topics for a list of topic strings in decreasing order of relevance, ts for the timestamp of the end of the topic segment, and complete which is true only for the topic entry that covers the transcribed audio of the entire stream.

The normal usage pattern for the API is to call "stream" once with start set to 1 and then repeatedly call with the same parameters excluding start until the returned status is "processed" in which case the response will include the identified topics and transcript if requested.

Yactraq Example in Ruby ==

require "Speech2Topics.rb"

# Basic instantiation. Replace MASHAPE_KEY
client = Speech2Topics.new("MASHAPE_KEY")
secret = YACTRAQ_SECRET
adset = YACTRAQ_ADSET

response = client.stream("http://www.youtube.com/watch?v=NBuLeA7nNFk", secret, adset, nil, 1, 1)

puts response
Last 7 days, UTC

Average Latency
54ms

Average Uptime
100.0%

Current Status
Online

  • No information
  • Outage
  • Disruption
  • Normal
Average latency determined from Mashape to API Response time

Simple & Straightforward Pricing

Pay as you go. No long-term contracts.

Endpoints

HTTP 200 : Speech2Topics GET/stream-status
The response to a Speech2Topics status request. Describes the topic stream and optionally the transcript for the speech content of the associated media.
						{
  "length": 120,
  "status": "processed",
  "topics": [
    {
      "topics": [
        "iphone 5"
      ],
      "ts": 60,
      "complete": false,
      "sentiment": 1
    },
    {
      "topics": [
        "iphone 5",
        "android phone"
      ],
      "ts": 120,
      "complete": false,
      "sentiment": -1
    }
  ],
  "transcript": [
    {
      "p": 0.7,
      "ts": 0.4,
      "w": "hello"
    }
  ]
}						
Stream

Access the status of a Speech2Topics stream.


Test console
Description
Parameter
string

The URL of a audio/video stream to be processed.
Example: http://www.youtube.com/watch?v=NBuLeA7nNFk

url

Required

string

The id of an adset configured for your account.
Example: adset_value

adset

Optional

string

A guid that you wish to assign to this URL.
Example: youtube:NBuLeA7nNFk

guid

Optional

string

If provided and non-zero will initiate processing of this media stream if not already done. A value of 'redo' will rerun the interpretation process.
Example: 1

start

Optional

number

Non-zero if the raw ASR transcript of the vide is requested.
Example: 1

tx

Optional

  • string – API Failure

    HTTP 400
  • string – Auth Failure

    HTTP 401
  • string

    HTTP 0

You must have an API key to test this API!


Mashape allows developers to find, consume, and distribute cloud APIs just like Speech2Topics.

Login to your account or signup: Create Account

or
   Signup with GitHub

By signing up you agree to our terms of service.