@@ -274,8 +274,7 @@ const speechToTextProviders = {
274274 type : 'boolean' ,
275275 default : false ,
276276 optional : true ,
277- description :
278- 'If enabled, Amazon Transcribe will automatically identify the language spoken in the audio.'
277+ description : 'If enabled, Amazon Transcribe will automatically identify the language spoken in the audio.'
279278 } ,
280279 {
281280 label : 'Language Options' ,
@@ -487,64 +486,64 @@ const SpeechToText = ({ dialogProps, onConfirm }) => {
487486 } )
488487 } )
489488 . map ( ( inputParam , index ) => (
490- < Box key = { inputParam . name || index } sx = { { p : 2 } } >
491- < div style = { { display : 'flex' , flexDirection : 'row' } } >
492- < Typography >
493- { inputParam . label }
494- { ! inputParam . optional && < span style = { { color : 'red' } } > *</ span > }
495- { inputParam . description && (
496- < TooltipWithParser style = { { marginLeft : 10 } } title = { inputParam . description } />
497- ) }
498- </ Typography >
499- </ div >
500- { inputParam . type === 'credential' && (
501- < CredentialInputHandler
502- key = { speechToText [ selectedProvider ] ?. credentialId }
503- data = {
504- speechToText [ selectedProvider ] ?. credentialId
505- ? { credential : speechToText [ selectedProvider ] . credentialId }
506- : { }
507- }
508- inputParam = { inputParam }
509- onSelect = { ( newValue ) => setValue ( newValue , selectedProvider , 'credentialId' ) }
510- />
511- ) }
512- { inputParam . type === 'boolean' && (
513- < SwitchInput
514- onChange = { ( newValue ) => setValue ( newValue , selectedProvider , inputParam . name ) }
515- value = {
516- speechToText [ selectedProvider ]
517- ? speechToText [ selectedProvider ] [ inputParam . name ]
518- : inputParam . default ?? false
519- }
520- />
521- ) }
522- { ( inputParam . type === 'string' || inputParam . type === 'password' || inputParam . type === 'number' ) && (
523- < Input
524- inputParam = { inputParam }
525- onChange = { ( newValue ) => setValue ( newValue , selectedProvider , inputParam . name ) }
526- value = {
527- speechToText [ selectedProvider ]
528- ? speechToText [ selectedProvider ] [ inputParam . name ]
529- : inputParam . default ?? ''
530- }
531- />
532- ) }
489+ < Box key = { inputParam . name || index } sx = { { p : 2 } } >
490+ < div style = { { display : 'flex' , flexDirection : 'row' } } >
491+ < Typography >
492+ { inputParam . label }
493+ { ! inputParam . optional && < span style = { { color : 'red' } } > *</ span > }
494+ { inputParam . description && (
495+ < TooltipWithParser style = { { marginLeft : 10 } } title = { inputParam . description } />
496+ ) }
497+ </ Typography >
498+ </ div >
499+ { inputParam . type === 'credential' && (
500+ < CredentialInputHandler
501+ key = { speechToText [ selectedProvider ] ?. credentialId }
502+ data = {
503+ speechToText [ selectedProvider ] ?. credentialId
504+ ? { credential : speechToText [ selectedProvider ] . credentialId }
505+ : { }
506+ }
507+ inputParam = { inputParam }
508+ onSelect = { ( newValue ) => setValue ( newValue , selectedProvider , 'credentialId' ) }
509+ />
510+ ) }
511+ { inputParam . type === 'boolean' && (
512+ < SwitchInput
513+ onChange = { ( newValue ) => setValue ( newValue , selectedProvider , inputParam . name ) }
514+ value = {
515+ speechToText [ selectedProvider ]
516+ ? speechToText [ selectedProvider ] [ inputParam . name ]
517+ : inputParam . default ?? false
518+ }
519+ />
520+ ) }
521+ { ( inputParam . type === 'string' || inputParam . type === 'password' || inputParam . type === 'number' ) && (
522+ < Input
523+ inputParam = { inputParam }
524+ onChange = { ( newValue ) => setValue ( newValue , selectedProvider , inputParam . name ) }
525+ value = {
526+ speechToText [ selectedProvider ]
527+ ? speechToText [ selectedProvider ] [ inputParam . name ]
528+ : inputParam . default ?? ''
529+ }
530+ />
531+ ) }
533532
534- { inputParam . type === 'options' && (
535- < Dropdown
536- name = { inputParam . name }
537- options = { inputParam . options }
538- onSelect = { ( newValue ) => setValue ( newValue , selectedProvider , inputParam . name ) }
539- value = {
540- speechToText [ selectedProvider ]
541- ? speechToText [ selectedProvider ] [ inputParam . name ]
542- : inputParam . default ?? 'choose an option'
543- }
544- />
545- ) }
546- </ Box >
547- ) ) }
533+ { inputParam . type === 'options' && (
534+ < Dropdown
535+ name = { inputParam . name }
536+ options = { inputParam . options }
537+ onSelect = { ( newValue ) => setValue ( newValue , selectedProvider , inputParam . name ) }
538+ value = {
539+ speechToText [ selectedProvider ]
540+ ? speechToText [ selectedProvider ] [ inputParam . name ]
541+ : inputParam . default ?? 'choose an option'
542+ }
543+ />
544+ ) }
545+ </ Box >
546+ ) ) }
548547 </ >
549548 ) }
550549 < Box sx = { { display : 'flex' , justifyContent : 'flex-end' , width : '100%' , mt : 2 } } >
0 commit comments