Skip to content

Commit 4ddfbe4

Browse files
committed
join audiochunks nit
1 parent 088587a commit 4ddfbe4

File tree

5 files changed

+5
-20
lines changed

5 files changed

+5
-20
lines changed

bifrost/packages/llm-mapper/mappers/openai/realtime.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,7 @@ const combineAudioBuffers = (audioBuffer: SocketMessage[], audio_key: "audio" |
161161
.filter((chunk) => chunk.length > 0);
162162

163163
// If we have valid chunks, combine them
164-
let combinedAudio = "";
165-
if (audioChunks.length > 0) {
166-
combinedAudio = audioChunks.join("");
167-
}
164+
let combinedAudio = audioChunks.join("");
168165

169166
const combinedMsg: SocketMessage = {
170167
type: firstMsg.type,

packages/llm-mapper/mappers/openai/realtime.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,7 @@ const combineAudioBuffers = (audioBuffer: SocketMessage[], audio_key: "audio" |
161161
.filter((chunk) => chunk.length > 0);
162162

163163
// If we have valid chunks, combine them
164-
let combinedAudio = "";
165-
if (audioChunks.length > 0) {
166-
combinedAudio = audioChunks.join("");
167-
}
164+
let combinedAudio = audioChunks.join("");
168165

169166
const combinedMsg: SocketMessage = {
170167
type: firstMsg.type,

valhalla/jawn/src/packages/llm-mapper/mappers/openai/realtime.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,7 @@ const combineAudioBuffers = (audioBuffer: SocketMessage[], audio_key: "audio" |
161161
.filter((chunk) => chunk.length > 0);
162162

163163
// If we have valid chunks, combine them
164-
let combinedAudio = "";
165-
if (audioChunks.length > 0) {
166-
combinedAudio = audioChunks.join("");
167-
}
164+
let combinedAudio = audioChunks.join("");
168165

169166
const combinedMsg: SocketMessage = {
170167
type: firstMsg.type,

web/packages/llm-mapper/mappers/openai/realtime.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,7 @@ const combineAudioBuffers = (audioBuffer: SocketMessage[], audio_key: "audio" |
161161
.filter((chunk) => chunk.length > 0);
162162

163163
// If we have valid chunks, combine them
164-
let combinedAudio = "";
165-
if (audioChunks.length > 0) {
166-
combinedAudio = audioChunks.join("");
167-
}
164+
let combinedAudio = audioChunks.join("");
168165

169166
const combinedMsg: SocketMessage = {
170167
type: firstMsg.type,

worker/src/packages/llm-mapper/mappers/openai/realtime.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,7 @@ const combineAudioBuffers = (audioBuffer: SocketMessage[], audio_key: "audio" |
161161
.filter((chunk) => chunk.length > 0);
162162

163163
// If we have valid chunks, combine them
164-
let combinedAudio = "";
165-
if (audioChunks.length > 0) {
166-
combinedAudio = audioChunks.join("");
167-
}
164+
let combinedAudio = audioChunks.join("");
168165

169166
const combinedMsg: SocketMessage = {
170167
type: firstMsg.type,

0 commit comments

Comments
 (0)