Azure
Properties used to connect to Azure Cognitive Services.
azure
- Type: {
textToSpeech?: TextToSpeech
,
speechToText?: SpeechToText
,
summarization?: Summarization
,
translation?: Translation
}
Service Types
TextToSpeech
-
Type: {
region: string
,
lang?: string
,
name?: string
gender?: string
,
outputFormat?: string
} -
Default: {lang: "en-US", name: "en-US-JennyNeural", gender: "Female", outputFormat: "audio-16khz-128kbitrate-mono-mp3"}
Connect to Azure's text to speech
API.
region
is a required string property to denote the region of your speech service, e.g. "eastus".
lang
is the locale (BCP-47) string code for the language of the audio output. See here for available options.
name
is the name of the voice used for the audio output. See here for available options.
gender
is the gender of the audio output voice. E.g. "Female" or "Male".
outputFormat
is the output audio format. See here for available options.
Example
- Sample code
- Full code
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"textToSpeech": {"region": "eastus"}
}
}'
></deep-chat>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"textToSpeech": {"region": "eastus"}
}
}'
style="border-radius: 8px"
></deep-chat>
SpeechToText
- Type: {
region: string
,lang?: string
} - Default: {lang: "en-US"}
Connect to Azure's speech to text
API.
region
is a required string property to denote the region of your speech service, e.g. "eastus".
lang
is the locale (BCP-47) string code for the language of the input output. See here for available options.
Example
- Sample code
- Full code
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"speechToText": {"region": "eastus"}
}
}'
></deep-chat>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"speechToText": {"region": "eastus"}
}
}'
style="border-radius: 8px"
></deep-chat>
Summarization
- Type: {
endpoint: string
,language?: string
} - Default: {language: "en"}
Connect to Azure's summarization
API. Please read here how to generate a language service.
endpoint
is the full endpoint for your generated language service.
language
is a BCP 47 language tag for the language of your text.
Example
Cannot input a test key as user's language service endpoint
is required.
- Sample code
- Full code
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"summarization": {"endpoint": "https://placeholderresource.cognitiveservices.azure.com"}
}
}'
></deep-chat>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"summarization": {"endpoint": "https://placeholderresource.cognitiveservices.azure.com"}
}
}'
style="border-radius: 8px"
></deep-chat>
Translation
- Type: {
region?: string
,language?: string
} - Default: {language: "es"}
Connect to Azure's translation
API.
region
is the region of your translator resource. This is optional if your resource is global.
language
is the BCP 47 language tag for the language you are translating to from English.
Example
- Sample code
- Full code
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"translation": {"region": "eastus", "language": "ja"}
}
}'
></deep-chat>
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"translation": {"region": "eastus", "language": "ja"}
}
}'
style="border-radius: 8px"
></deep-chat>