Skip to content

Commit

Permalink
chore(format): run black on dev (#560)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Jul 10, 2024
1 parent 40fbbc2 commit d089bd2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/#521.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def calculate_rms(data):
logger.info("RM: %f", m)
return np.sqrt(m)


# 流式声音处理器
class AudioStreamer:
# 流式写入
Expand Down
2 changes: 1 addition & 1 deletion tools/audio/np.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

@jit
def float_to_int16(audio: np.ndarray) -> np.ndarray:
am = int(math.ceil(float(np.abs(audio).max()))*32768)
am = int(math.ceil(float(np.abs(audio).max())) * 32768)
am = 32767 * 32768 // am
return np.multiply(audio, am).astype(np.int16)

0 comments on commit d089bd2

Please sign in to comment.