这是indexloc提供的服务,不要输入任何密码
Skip to content

TimeoutException after 0:00:30.000000: Future not completed #209

@ChunhThanhDe

Description

@ChunhThanhDe

I use whisper-1 to convert voice to text with a 22mb mp3 file and get this error.

Does anyone have any solution for this case, if possible it would be good to see the processing progress as %

MyCode:

  Future<String> convertSpeechToText(String filePath) async {
    File audioFile = File(filePath);

    try {
      print(" convertSpeechToText start transcription ");
      OpenAIAudioModel transcription = await OpenAI.instance.audio.createTranscription(
        file: audioFile,
        model: "whisper-1",
        responseFormat: OpenAIAudioResponseFormat.text,
      );
      print(" convertSpeechToText start done ");
      return transcription.text;
    } catch (e) {
      print(" convertSpeechToText error " + e.toString());
      return "Error: $e";
    }
  }

my log

D/FilePickerUtils(10601): File loaded and cached at:/data/user/0/com.example.tutor_ai/cache/file_picker/1741079453984/Cách để tập trung làm việc.mp3
D/FilePickerDelegate(10601): File path:[com.mr.flutter.plugin.filepicker.FileInfo@ace0a0f]
I/flutter (10601):  convertSpeechToText start
I/flutter (10601):  convertSpeechToText start transcription 
I/flutter (10601):  convertSpeechToText error TimeoutException after 0:00:30.000000: Future not completed
Lost connection to device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions