Skip to main content

Azure

Properties used to connect to Azure Cognitive Services.

azure

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

<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"textToSpeech": {"region": "eastus"}
}
}'
></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

<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"speechToText": {"region": "eastus"}
}
}'
></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

caution

Cannot input a test key as user's language service endpoint is required.

<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"summarization": {"endpoint": "https://placeholderresource.cognitiveservices.azure.com"}
}
}'
></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

<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"translation": {"region": "eastus", "language": "ja"}
}
}'
></deep-chat>

OpenAI

Connect to the Azure OpenAI's API:
urlDetails is used to define the url parameters that will be used to connect to Azure. endpoint is a url string for your OpenAI resource, version is the API version to be used and deploymentId is the deployment id of the model.
chat defines whether to connect to the Chat Completions API. It uses the same type as the OpenAI Chat property.
assistant defines whether to connect to the Assistant API. It uses the same type as the OpenAI Assistant property.

Basic Example

<deep-chat
directConnection='{
"azure": {
"key": "placeholder key",
"openAI": {
"urlDetails": {
"endpoint": "https://your-endpoint.com",
"version": "2024-10-21",
"deploymentId": "123123"
},
"chat": true
}
}
}'
></deep-chat>