-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/Add Azure Cognitive speech-to-text functionality (#3718)
* feat: Add Azure Cognitive Services integration for speech-to-text functionality - Introduced a new credential class for Azure Cognitive Services. - Updated speech-to-text processing to support Azure Cognitive Services as a provider. - Enhanced UI components to include Azure Cognitive Services options and inputs for configuration. - Added necessary imports and error handling for Azure API requests. * Update SpeechToText.jsx linting * refactor: Update audio file handling in SpeechToText component - Removed the dependency on 'form-data' and replaced it with a Blob for audio file uploads. - Simplified the audio file appending process to the form data. - Cleaned up the headers in the Axios request by removing unnecessary form data headers. This change enhances the efficiency of audio file processing in the speech-to-text functionality. --------- Co-authored-by: Henry Heng <[email protected]> Co-authored-by: Henry <[email protected]>
- Loading branch information
1 parent
fff6319
commit 2360f5f
Showing
3 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
packages/components/credentials/AzureCognitiveServices.credential.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { INodeParams, INodeCredential } from '../src/Interface' | ||
|
||
class AzureCognitiveServices implements INodeCredential { | ||
label: string | ||
name: string | ||
version: number | ||
inputs: INodeParams[] | ||
|
||
constructor() { | ||
this.label = 'Azure Cognitive Services' | ||
this.name = 'azureCognitiveServices' | ||
this.version = 1.0 | ||
this.inputs = [ | ||
{ | ||
label: 'Azure Subscription Key', | ||
name: 'azureSubscriptionKey', | ||
type: 'password', | ||
description: 'Your Azure Cognitive Services subscription key' | ||
}, | ||
{ | ||
label: 'Service Region', | ||
name: 'serviceRegion', | ||
type: 'string', | ||
description: 'The Azure service region (e.g., "westus", "eastus")', | ||
placeholder: 'westus' | ||
}, | ||
{ | ||
label: 'API Version', | ||
name: 'apiVersion', | ||
type: 'string', | ||
description: 'The API version to use (e.g., "2024-05-15-preview")', | ||
placeholder: '2024-05-15-preview', | ||
default: '2024-05-15-preview' | ||
} | ||
] | ||
} | ||
} | ||
|
||
module.exports = { credClass: AzureCognitiveServices } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters