chore: audio file .m4a support
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
useState
|
||||
} from 'react';
|
||||
import { speechToText } from '../apis';
|
||||
import { SpeechToTextFormat } from '../config';
|
||||
import { RealtimeParamsConfig as paramsConfig } from '../config/params-config';
|
||||
import '../style/ground-left.less';
|
||||
import '../style/speech-to-text.less';
|
||||
@@ -306,7 +307,7 @@ const GroundLeft: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
{!isRecording && (
|
||||
<UploadAudio
|
||||
type="default"
|
||||
accept=".mp3,.mp4,.wav"
|
||||
accept={SpeechToTextFormat.join(',')}
|
||||
onChange={handleUploadChange}
|
||||
></UploadAudio>
|
||||
)}
|
||||
|
||||
@@ -137,6 +137,8 @@ export const OpenAIViewCode = {
|
||||
}
|
||||
};
|
||||
|
||||
export const SpeechToTextFormat = ['.mp3', '.mp4', '.wav', '.m4a'];
|
||||
|
||||
export const promptList = [
|
||||
'a lovely cat.',
|
||||
"Digital art, portrait of an anthropomorphic roaring Tiger warrior with full armor, close up in the middle of a battle, behind him there is a banner with the text 'Open Source'.",
|
||||
|
||||
Reference in New Issue
Block a user