hra42 / 42Summaries

42Summaries is a macOS application that transcribes audio and video files, then generates concise summaries using Ollama.
https://42summaries.com
The Unlicense
1 stars 0 forks source link

Set up Speech Recognition #27

Closed hra42 closed 2 weeks ago

hra42 commented 2 weeks ago

▪ Implement the Speech framework for audio transcription. ▪ Create a Transcription Service class to handle the speech recognition process. ▪ Add methods for starting, stopping, and handling the transcription results.

hra42 commented 2 weeks ago

here's what we need to do:

  1. Implement TranscriptionService to handle audio file transcription.
  2. Update TranscriptionManager to use TranscriptionService for actual file transcription.
  3. Modify TranscriptionView to use the file selection mechanism from FileSelectionView and display transcription results using components similar to SummaryView.

Let's outline the steps for implementation:

  1. In TranscriptionService.swift: ▪ Implement a method to transcribe audio files using SFSpeechRecognizer and AVAudioEngine. ▪ Support common audio formats (.wav, .mp3, .m4a, etc.). ▪ Provide progress updates during transcription. ▪ Handle errors for unsupported file types or recognition failures.

  2. In TranscriptionManager.swift: ▪ Replace the mock implementation with actual transcription using TranscriptionService. ▪ Handle file selection and transcription initiation. ▪ Update progress and status based on the transcription process.

  3. In TranscriptionView.swift: ▪ Integrate the file selection mechanism from FileSelectionView. ▪ Display transcription results using a similar layout to SummaryView. ▪ Show progress during transcription. ▪ Allow copying and exporting of transcription results.

  4. Create a new TranscriptionResultView.swift: ▪ Similar to SummaryView, but for displaying transcription results. ▪ Include options for formatting, copying, and exporting the transcription.

  5. Update ExportManager.swift: ▪ Ensure it can handle exporting transcriptions as well as summaries.