Skip to main content

core.proto

path phonexia/grpc/common/core.proto

package phonexia.grpc.common

Phonexia common message definitions for gRPC API.


Messages

Audio

Audio message in either raw or one of the standard formats.

In the case of raw format, this message contains raw audio data that are encoded in a format specified in the configuration. The audio content is represented as raw audio if the raw_audio_config field is specified.

In case that the raw_audio_config field is not specified, this message contains audio data in one of the supported standard formats and encodings. Supported formats are WAV (various encodings) and FLAC. For best results, the audio source should be captured and transmitted using a lossless encoding (FLAC or LINEAR16). The accuracy of the speech technologies can be reduced if lossy codecs are used to capture or transmit audio, particularly if background noise is present. Lossy codecs include ALAW or MULAW Important: all Phonexia microservices that are audio-based, with the exception of MediaNormalization and TimeAnalysis, only support mono-channel audio. See https://docs.phonexia.com/products/speech-platform-4/microservices/audio-formats

NameTypeDescription
contentbytes

The audio data bytes encoded in the supported format. In case of raw audio, this field does not include the audio header, but only the data. Note: as with all bytes fields, proto buffers use a pure binary representation.

time_rangeTimeRange

Time range of the audio to process. If omitted, the whole audio is processed. If start is omitted, the audio is processed from the beginning. If end is omitted, the audio is processed to the end.

raw_audio_configRawAudioConfig

Specify raw audio metadata in case that the content is in raw format.

Matrix

Data type representing matrix of values. The matrix is represented as a linear array in row major format.

NameTypeDescription
rows_countuint64

Number of rows in the matrix.

columns_countuint64

Number of columns in the matrix.

valuesrepeated float

Sequential list of matrix values in row major format.

RawAudioConfig

Configuration message for raw audio data used in Audio message.

NameTypeDescription
encodingRawAudioConfig.AudioEncoding

The encoding of the audio data. This field determines how the raw audio data is interpreted.

sample_rate_hertzint32

The sample rate in hertz (Hz) of the audio data. This field specifies the number of audio samples per second. Most Phonexia technologies resample the audio into 8kHz or 16kHz as a first step.

channelsint32

The number of channels in the audio data. Note: if not specified otherwise, technologies only support mono-channel audio recordings. Setting this field to values other than 1 will result in an error for such technologies.

TimeRange

Data type representing time range.

NameTypeDescription
startgoogle.protobuf.Duration

Start time of the time range.

endgoogle.protobuf.Duration

End time of the time range.

TimestampRange

Data type representing timestamp range.

NameTypeDescription
startgoogle.protobuf.Timestamp

Timestamp specifying the beginning of the range.

endgoogle.protobuf.Timestamp

Timestamp specifying the end of the range.

Vector

Data type representing a vector of float values.

NameTypeDescription
valuesrepeated float

Sequential list of vector values.

Voiceprint

Represents the result from voiceprint extraction.

NameTypeDescription
contentbytes

Voiceprint data bytes in one of the supported formats:

  • UBJSON (Speech Platform 4 native)
  • binary XL5 voiceprint (Speech Engine 3 native)

Enums

RawAudioConfig.AudioEncoding

Enumeration of supported audio encodings for raw audio data.

NameNumberDescription
PCM160

16-bit signed little-endian linear Pulse Code Modulation

PCM321

32-bit signed little-endian linear Pulse Code Modulation

MULAW2

μ-law encoding

ALAW3

A-law encoding