Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "context-switch"
version = "1.1.0"
version = "1.1.1"
edition = "2024"
rust-version = "1.88"

Expand Down
2 changes: 1 addition & 1 deletion audio-knife/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "audio-knife"
version = "1.4.0"
version = "1.4.1"
edition = "2024"

[profile.dev]
Expand Down
1 change: 1 addition & 0 deletions audio-knife/src/app_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use axum::{
response::{IntoResponse, Response},
};

#[allow(unused)]
pub struct AppError(anyhow::Error);

// Tell axum how to convert `AppError` into a response.
Expand Down
2 changes: 1 addition & 1 deletion external/azure-speech-sdk-rs
12 changes: 6 additions & 6 deletions services/azure/src/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ impl Service for AzureTranslate {
sample_rate: 16000,
};

if let Some(audio_format) = output_modalities.audio {
if audio_format != AUDIO_OUTPUT_FORMAT {
bail!(
"Only {AUDIO_OUTPUT_FORMAT:?} is supported, but output modalities contains {audio_format:?}"
);
}
if let Some(audio_format) = output_modalities.audio
&& audio_format != AUDIO_OUTPUT_FORMAT
{
bail!(
"Only {AUDIO_OUTPUT_FORMAT:?} is supported, but output modalities contains {audio_format:?}"
);
}

// Host / Auth is lightweight, so we can create this every time.
Expand Down
17 changes: 8 additions & 9 deletions services/playback/src/stream_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@ impl io::Read for StreamReader {
}

// If we have a current chunk with remaining data, use it
if let Some(ref chunk) = self.current_chunk {
if self.chunk_offset < chunk.len() {
let remaining_in_chunk = chunk.len() - self.chunk_offset;
let to_copy = std::cmp::min(buf.len(), remaining_in_chunk);
if let Some(ref chunk) = self.current_chunk
&& self.chunk_offset < chunk.len()
{
let remaining_in_chunk = chunk.len() - self.chunk_offset;
let to_copy = std::cmp::min(buf.len(), remaining_in_chunk);

buf[..to_copy]
.copy_from_slice(&chunk[self.chunk_offset..self.chunk_offset + to_copy]);
self.chunk_offset += to_copy;
buf[..to_copy].copy_from_slice(&chunk[self.chunk_offset..self.chunk_offset + to_copy]);
self.chunk_offset += to_copy;

return Ok(to_copy);
}
return Ok(to_copy);
}

// Need to get the next chunk from the stream
Expand Down
Loading