Encoders¶
Obtém a relação dos encoders de áudio disponíveis.
Requisição
GET /rest/v2/encoders
- HTTP Headers
- Nenhum.
- Parâmetros da requisição
- Nenhum.
Resultado
O resultado é um objeto que possui a seguinte estrutura:
- name: nome do encoder
- codec: indica o tipo de codificação
- sampleRate: taxa de amostragem do áudio
- bitsPerSample: tamanho da amostra em bits
- channels: número de canais de áudio
Exemplos
Chamada REST:
curl -X GET \
--user username:passwd \
--header "Accept: application/json" \
"http://speech.cpqd.com.br/tts/rest/v2/encoders"
Resultado JSON:
[
{
"name": "alaw/16000/8/2",
"codec": "alaw",
"sampleRate": 16000,
"bitsPerSample": 8,
"channels": 2
},
{
"name": "alaw/16000/8/1",
"codec": "alaw",
"sampleRate": 16000,
"bitsPerSample": 8,
"channels": 1
},
{
"name": "alaw/8000/8/2",
"codec": "alaw",
"sampleRate": 8000,
"bitsPerSample": 8,
"channels": 2
},
{
"name": "alaw/8000/8/1",
"codec": "alaw",
"sampleRate": 8000,
"bitsPerSample": 8,
"channels": 1
},
{
"name": "wav/8000/8/2",
"codec": "wav",
"sampleRate": 8000,
"bitsPerSample": 8,
"channels": 2
},
{
"name": "wav/8000/8/1",
"codec": "wav",
"sampleRate": 8000,
"bitsPerSample": 8,
"channels": 1
},
{
"name": "wav/8000/16/2",
"codec": "wav",
"sampleRate": 8000,
"bitsPerSample": 16,
"channels": 2
},
{
"name": "wav/8000/16/1",
"codec": "wav",
"sampleRate": 8000,
"bitsPerSample": 16,
"channels": 1
},
{
"name": "wav/16000/16/2",
"codec": "wav",
"sampleRate": 16000,
"bitsPerSample": 16,
"channels": 2
},
{
"name": "wav/16000/16/1",
"codec": "wav",
"sampleRate": 16000,
"bitsPerSample": 16,
"channels": 1
},
{
"name": "pcm/8000/8/2",
"codec": "pcm",
"sampleRate": 8000,
"bitsPerSample": 8,
"channels": 2
},
{
"name": "pcm/8000/8/1",
"codec": "pcm",
"sampleRate": 8000,
"bitsPerSample": 8,
"channels": 1
},
{
"name": "pcm/8000/16/2",
"codec": "pcm",
"sampleRate": 8000,
"bitsPerSample": 16,
"channels": 2
},
{
"name": "pcm/8000/16/1",
"codec": "pcm",
"sampleRate": 8000,
"bitsPerSample": 16,
"channels": 1
},
{
"name": "pcm/16000/16/2",
"codec": "pcm",
"sampleRate": 16000,
"bitsPerSample": 16,
"channels": 2
},
{
"name": "pcm/16000/16/1",
"codec": "pcm",
"sampleRate": 16000,
"bitsPerSample": 16,
"channels": 1
}
]
Resultado XML:
<EncoderInfos>
<item>
<name>alaw/16000/8/2</name>
<codec>alaw</codec>
<sampleRate>16000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>alaw/16000/8/1</name>
<codec>alaw</codec>
<sampleRate>16000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>1</channels>
</item>
<item>
<name>alaw/8000/8/2</name>
<codec>alaw</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>alaw/8000/8/1</name>
<codec>alaw</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>1</channels>
</item>
<item>
<name>wav/8000/8/2</name>
<codec>wav</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>wav/8000/8/1</name>
<codec>wav</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>1</channels>
</item>
<item>
<name>wav/8000/16/2</name>
<codec>wav</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>wav/8000/16/1</name>
<codec>wav</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>1</channels>
</item>
<item>
<name>wav/16000/16/2</name>
<codec>wav</codec>
<sampleRate>16000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>wav/16000/16/1</name>
<codec>wav</codec>
<sampleRate>16000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>1</channels>
</item>
<item>
<name>pcm/8000/8/2</name>
<codec>pcm</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>pcm/8000/8/1</name>
<codec>pcm</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>8</bitsPerSample>
<channels>1</channels>
</item>
<item>
<name>pcm/8000/16/2</name>
<codec>pcm</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>pcm/8000/16/1</name>
<codec>pcm</codec>
<sampleRate>8000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>1</channels>
</item>
<item>
<name>pcm/16000/16/2</name>
<codec>pcm</codec>
<sampleRate>16000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>2</channels>
</item>
<item>
<name>pcm/16000/16/1</name>
<codec>pcm</codec>
<sampleRate>16000</sampleRate>
<bitsPerSample>16</bitsPerSample>
<channels>1</channels>
</item>
</EncoderInfos>