Skip to content

Commit

Permalink
feat: add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Sep 23, 2023
1 parent 1967ede commit d956894
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions android/src/main/java/com/rnwhisper/WhisperContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ public void run() {
Log.e(NAME, "Error transcribing realtime: " + e.getMessage());
}
}
// TODO: Append in real time so we don't need to keep all slices & also reduce memory usage
Log.d(NAME, "Begin saving wav file to " + audioOutputPath);
saveWavFile(concatShortBuffers(shortBufferSlices), audioOutputPath);
if (!isTranscribing) {
Expand Down
1 change: 1 addition & 0 deletions ios/RNWhisperContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ - (void)fullTranscribeSamples:(RNWhisperContextRecordState*) state {

// Save wav if needed
if (state->options[@"audioOutputPath"] != nil) {
// TODO: Append in real time so we don't need to keep all slices & also reduce memory usage
[RNWhisperAudioUtils
saveWavFile:[RNWhisperAudioUtils concatShortBuffers:state->shortBufferSlices
sliceNSamples:state->sliceNSamples]
Expand Down

0 comments on commit d956894

Please sign in to comment.