Class Track

ru.yandex.speechkit

public  class  Track 

Music recognition result.

Nested Classes

Constructors

Track(@NonNull String title, @NonNull String id, @NonNull String url, @NonNull Artist[] artists, @NonNull String jsonPayload)

Creates an object of the Track class.

Methods

List< Artist >getArtists()

Returns a list of objects of the Artist class.

StringgetId()

Returns the ID of the musical work on music.yandex.ru.

org.json.JSONObjectgetJsonPayload()

Returns the music recognition result in JSON.

StringgetTitle()

Returns the name of the musical work.

java.net.URLgetUrl()

Returns a link to the musical work on music.yandex.ru.

StringtoString()

Constructor Detail

Track

public Track (@NonNull String title, @NonNull String id, @NonNull String url, @NonNull Artist[] artists, @NonNull String jsonPayload)

Creates an object of the Track class.

Parameters:
title

Name of the musical work.

id

ID of the musical work on music.yandex.ru.

url

Link to the musical work on music.yandex.ru.

artists

List of performers of the musical work.

jsonPayload

Recognition result in JSON.

Throws:

JSONException

An exception is thrown if an error occurs when forming JSON results.

Method Detail

getArtists

public List< Artist > getArtists ()

Returns a list of objects of the Artist class.

Returns:

List of performers of the musical work.

getId

public String getId ()

Returns the ID of the musical work on music.yandex.ru.

Returns:

ID of the musical work on music.yandex.ru.

getJsonPayload

public org.json.JSONObject getJsonPayload ()

Returns the music recognition result in JSON.

Returns:

Recognition result in JSON.

getTitle

public String getTitle ()

Returns the name of the musical work.

Returns:

Name of the musical work.

getUrl

public java.net.URL getUrl ()

Returns a link to the musical work on music.yandex.ru.

Returns:

Link to the musical work on music.yandex.ru.

toString

public String toString ()