Skip to content

Commit f04f1ba

Browse files
committed
chore: sync with upstream
2 parents e6642fc + c54208c commit f04f1ba

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎components/acoustics-porting/porting/algorithm/node/speech_commands_preprocess.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <string>
2121
#include <string_view>
2222

23-
namespace porting::algorithms::node {
23+
namespace porting::algorithm::node {
2424

2525
class SpeechCommandsPreprocess final: public module::MNode
2626
{
@@ -275,7 +275,7 @@ class SpeechCommandsPreprocess final: public module::MNode
275275
float *_window_buffer;
276276
};
277277

278-
} // namespace porting::algorithms::node
278+
} // namespace porting::algorithm::node
279279

280280
#endif // SPEECH_COMMANDS_PREPROCESS_HPP
281281

‎components/acoustics/api/v1/task_sc.hpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace shared {
4343
inline std::atomic<bool> is_sampling = false;
4444
inline std::atomic<bool> is_invoking = false;
4545

46-
inline constexpr const size_t buffer_size = 102400;
46+
inline constexpr const size_t buffer_size = 131072;
4747
inline constexpr const size_t buffer_size_mask = buffer_size - 1;
4848
inline std::mutex buffer_mutex;
4949
inline size_t buffer_head = 0;
@@ -188,7 +188,8 @@ struct TaskSC final
188188
const std::lock_guard<std::mutex> lock(v1::shared::buffer_mutex);
189189
const size_t head = v1::shared::buffer_head;
190190
const size_t tail = v1::shared::buffer_tail;
191-
const size_t next_head = head + shape[0];
191+
const size_t next_head = head + size;
192+
192193
if (static_cast<size_t>(next_head - tail) > v1::shared::buffer_size) [[unlikely]]
193194
{
194195
v1::shared::buffer_tail = next_head - v1::shared::buffer_size;

‎scripts/speech_commands_model_converter.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _get_concrete_input_shape(model: tf.Module) -> Optional[tuple[int, ...]]:
9797
def convert(
9898
tfjs_dir: Path,
9999
output_tflite: Path,
100-
quantize: str = "none",
100+
quantize: str,
101101
rep_data: Optional[Path] = None,
102102
input_shape_override: Optional[str] = None,
103103
) -> Path:

0 commit comments

Comments
 (0)