mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
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 <henryheng@flowiseai.com> Co-authored-by: Henry <hzj94@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
fff6319f5d
commit
2360f5fdeb
@@ -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 }
|
||||
Reference in New Issue
Block a user