Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Weekly10' into release/0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yugyeom-ghim committed Nov 8, 2024
2 parents 4e756a0 + 532e44a commit fa22fc1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/main/java/notai/stt/application/SttService.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package notai.stt.application;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import notai.pageRecording.domain.PageRecording;
import notai.pageRecording.domain.PageRecordingRepository;
import notai.recording.domain.Recording;
Expand All @@ -16,7 +15,6 @@

import java.util.List;

@Slf4j
@Service
@Transactional
@RequiredArgsConstructor
Expand All @@ -36,9 +34,7 @@ public void updateSttResult(UpdateSttResultCommand command) {
Stt stt = sttTask.getStt();
Recording recording = stt.getRecording();

log.info("STT result update for recording: {}", recording.getId());
List<PageRecording> pageRecordings = pageRecordingRepository.findAllByRecordingIdOrderByStartTime(recording.getId());
log.info("Page recordings: {}", pageRecordings);

SttPageMatchedDto matchedResult = stt.matchWordsWithPages(command.words(), pageRecordings);
List<Stt> pageMatchedSttResults = Stt.createFromMatchedResult(recording, matchedResult);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package notai.stt.presentation;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import notai.stt.application.SttService;
import notai.stt.presentation.request.SttCallbackRequest;
import org.springframework.http.ResponseEntity;
Expand All @@ -11,14 +10,12 @@

@RestController
@RequiredArgsConstructor
@Slf4j
public class SttCallbackController {

private final SttService sttService;

@PostMapping("/api/ai/stt/callback")
public ResponseEntity<Void> sttCallback(@RequestBody SttCallbackRequest request) {
log.info("STT callback request: {}", request);
sttService.updateSttResult(request.toCommand());
return ResponseEntity.ok().build();
}
Expand Down

0 comments on commit fa22fc1

Please sign in to comment.