Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class OpenAiController {
private static final ObjectMapper MAPPER =
new ObjectMapper().setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);

private Resource sampleQuestionPcm = new ClassPathResource("static/question.pcm");
private final Resource sampleQuestionPcm = new ClassPathResource("static/question.pcm");

@GetMapping("/chatCompletion")
@Nonnull
Expand All @@ -53,9 +53,9 @@ Object chatCompletion(
return response.getContent();
}

@GetMapping(value = "/realtime/smokeTestTextToSpeech", produces = "audio/pcm")
@GetMapping(value = "/realtime/textToSpeech", produces = "audio/pcm")
@Nonnull
ResponseEntity<byte[]> smokeTestTextToSpeech() throws TimeoutException {
ResponseEntity<byte[]> textToSpeech() throws TimeoutException {
final var respBody = ByteBuffer.allocate(300000);
final var lock = new AtomicBoolean(false);
final AudioOutputChannel audioOutput =
Expand Down Expand Up @@ -85,9 +85,9 @@ ResponseEntity<byte[]> smokeTestTextToSpeech() throws TimeoutException {
throw new TimeoutException("Timeout waiting for text to speech");
}

@GetMapping(value = "/realtime/smokeTestSpeechToSpeech", produces = "audio/pcm")
@GetMapping(value = "/realtime/speechToSpeech", produces = "audio/pcm")
@Nonnull
ResponseEntity<byte[]> smokeTestSpeechToSpeech() throws TimeoutException {
ResponseEntity<byte[]> speechToSpeech() throws TimeoutException {
final var respBody = ByteBuffer.allocate(800000);
final var lock = new AtomicBoolean(false);
final AudioOutputChannel audioOutput =
Expand Down
Loading