Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChunhThanhDe opened this issue Mar 4, 2025 · 0 comments
Open

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

ChunhThanhDe opened this issue Mar 4, 2025 · 0 comments

Comments

@ChunhThanhDe
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant