[][src]Struct houndify::HoundServerResponse

pub struct HoundServerResponse {
    pub format: String,
    pub format_version: String,
    pub status: String,
    pub error_message: Option<String>,
    pub num_to_return: Option<i64>,
    pub all_results: Option<Vec<Map<String, Value>>>,
    pub disambiguation: Option<Map<String, Value>>,
    pub results_are_final: Option<Vec<bool>>,
    pub domain_usage: Option<Vec<DomainUsage>>,
    pub build_info: Option<BuildInfo>,
    pub query_id: String,
    pub server_generated_id: Option<String>,
    pub audio_length: Option<f64>,
    pub real_speech_time: Option<f64>,
    pub cpu_speech_time: Option<f64>,
    pub real_time: Option<f64>,
    pub cpu_time: Option<f64>,
    pub local_or_remote: Option<String>,
    pub local_or_remote_reason: Option<String>,
}

Reference: https://docs.houndify.com/reference/HoundServer

Fields

format: String

This field is a marker to verify that this is a value in this format.

format_version: String

This field specifies which version of this format is being used. The current version is 1.0. If a different version string is here, the format might not match what is documented here.

status: String

This field uses only a fixed, finite number of JSON strings to encode an enumeration.

error_message: Option<String>

If the "Status" was "Error", then this field will be present to give a human-readable explanation of what went wrong.

num_to_return: Option<i64>

If the "Status" was "OK", then the server received a proper request and processed it, and this field will be present to specify how many possible results it is returning.

all_results: Option<Vec<Map<String, Value>>>

If the "Status" was "OK", then the server received a proper request and processed it, and this field will be present to specify the possible results it came up with. The number of elements in the array will be equal to the value of the "NumToReturn" field.

disambiguation: Option<Map<String, Value>>

If the "Status" was "OK", then the server received a proper request and processed it, and this field will be present to specify information to help the client do disambiguous among the results being returned by the server in the "AllResults" array.

results_are_final: Option<Vec<bool>>

This field must have exactly the same number of elements as the "AllResults" field, and the elements of "ResultsAreFinal" correspond to the elements of "AllResults". If the client didn't set "ResultUpdateAllowed" in the RequestInfo, or set it to false, then the values in this array will always be true. If the client set "ResultUpdateAllowed" to true in the RequestInfo, then some or all of these elements may be false. Each one that is false means the corresponding element of "AllResults" is not final and will be updated by a HoundUpdate object. If any element of this array is false, the client should keep the connection open and wait for HoundUpdate objects to come, even while it is displaying the preliminary information to the user.

domain_usage: Option<Vec<DomainUsage>>

This field specifies which domains, if any, were used to generate the responses, and for each that was used to generate the responses, how many credits that domain cost. Note that this aggregates the domain usage and costs for all the responses in AllResults, so if there were multiple results, the total cost for some domains may be higher than the maximum cost of that domain per response.

build_info: Option<BuildInfo>

This field is used to send information about the details of the build of the server that generated this result. It is not required but highly recommended that each server put as much information here as possible. The data here shouldn't be relied on by the client. It is intended to help in debugging issues. If possible, all the information from this field should be included in bug reports.

query_id: String

This is a string that can be used to track this query for debugging purposes on the server. Each query is assigned a unique ID string.

server_generated_id: Option<String>

This is a deprecated copy of the "QueryID" string. It should not be counted on and it will be removed in the future.

audio_length: Option<f64>

This field is only present if the input is speech. It is the length of the audio input in seconds.

real_speech_time: Option<f64>

This field is only present if the input is speech. It is the amount of real time, in seconds, spent processing the speech.

cpu_speech_time: Option<f64>

This field is only present if the input is speech. It is the amount of CPU time, in seconds, spent processing the speech.

real_time: Option<f64>

This field is the amount of real time, in seconds, spent processing the query.

cpu_time: Option<f64>

This field is the amount of CPU time, in seconds, spent processing the query.

local_or_remote: Option<String>

If the Hound server returning this JSON is a dual server that can either service requests locally or use a remote server to service them, then it can set this field to indicate whether the result it is sending came from its local engine or a remote engine.

local_or_remote_reason: Option<String>

If the Hound server returning this JSON is a dual server that can either service requests locally or use a remote server to service them, then it can set this field to indicate why it chose the result from its local engine or a remote engine.

Trait Implementations

impl Debug for HoundServerResponse[src]

impl<'de> Deserialize<'de> for HoundServerResponse[src]

impl Serialize for HoundServerResponse[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,