GDSC-DGU / 2024-SolutionChallenge-earlips-frontend

2024 Solution Challenge Earlips Team Flutter Repository :)
MIT License
0 stars 3 forks source link

Fix: 대본으로 학습하기 API 연동 완료 #38

Closed bunju20 closed 6 months ago

bunju20 commented 6 months ago

🔥 Related Issues

⛅️ 작업 내용

👀 스크린샷 / GIF / 링크

1.record녹음하는 부분 lib/viewModels/script/create_script_viewmodel.dart

  Future<void> _startRecording() async {
    if (!_isRecorderInitialized || _isRecording) return;

    final directory = await getApplicationDocumentsDirectory();
    final filePath = '${directory.path}/${DateTime
        .now()
        .millisecondsSinceEpoch}.aac';

    await _audioRecorder!.startRecorder(
      toFile: filePath,
      codec: Codec.aacADTS,
    );

    _isRecording = true;
  }

startListening은 실시간으로 사용자 말을 text로 바꿔주는 애입니다.

  1. POST보내는부분lib/viewModels/script/create_script_viewmodel.dart
    Future<void> sendTextAndAudio()

    여기서 response받고 처리해서 넘겨줍니당.