diff --git a/docs/source/soundswallower.js.rst b/docs/source/soundswallower.js.rst index 1fc0541e..c2126276 100644 --- a/docs/source/soundswallower.js.rst +++ b/docs/source/soundswallower.js.rst @@ -6,7 +6,7 @@ SoundSwallower can be called either from Python (see case of JavaScript, we use `Emscripten `_ to compile the C library into WebAssembly, which is loaded by a JavaScript wrapper module. This means that there are certain -idiosyncracies that must be taken into account when using the library, +idiosyncrasies that must be taken into account when using the library, mostly with respect to deployment and initialization. Using SoundSwallower on the Web diff --git a/include/soundswallower/alignment.h b/include/soundswallower/alignment.h index d256099c..95ff7a06 100644 --- a/include/soundswallower/alignment.h +++ b/include/soundswallower/alignment.h @@ -169,7 +169,7 @@ alignment_entry_t *alignment_iter_get(alignment_iter_t *itor); alignment_iter_t *alignment_iter_goto(alignment_iter_t *itor, int pos); /** - * Retain an alighment + * Retain an alignment * @memberof alignment_t */ alignment_t *alignment_retain(alignment_t *al); @@ -209,7 +209,7 @@ alignment_iter_t *alignment_states(alignment_t *al); const char *alignment_iter_name(alignment_iter_t *itor); /** - * Get the timing and score information for the current segment of an aligment. + * Get the timing and score information for the current segment of an alignment. * * @memberof alignment_iter_t * @arg start Output pointer for start frame diff --git a/include/soundswallower/bitvec.h b/include/soundswallower/bitvec.h index 5422ffe1..88d89cfa 100644 --- a/include/soundswallower/bitvec.h +++ b/include/soundswallower/bitvec.h @@ -76,7 +76,7 @@ typedef uint32 bitvec_t; */ bitvec_t *bitvec_realloc(bitvec_t *vec, /* In: Bit vector to search */ size_t old_len, /* In: Old length */ - size_t new_len); /* In: New lenght of above bit vector */ + size_t new_len); /* In: New length of above bit vector */ /** * Free a bit vector. */ @@ -138,7 +138,7 @@ bitvec_t *bitvec_realloc(bitvec_t *vec, /* In: Bit vector to search */ * @return the number of bits being set in vector vec */ size_t bitvec_count_set(bitvec_t *vec, /* In: Bit vector to search */ - size_t len); /* In: Lenght of above bit vector */ + size_t len); /* In: Length of above bit vector */ #ifdef __cplusplus } diff --git a/include/soundswallower/cmn.h b/include/soundswallower/cmn.h index 6abbf5c6..203ef426 100644 --- a/include/soundswallower/cmn.h +++ b/include/soundswallower/cmn.h @@ -57,7 +57,7 @@ * Merged from the branch SPHINX3_5_2_RCI_IRII_BRANCH: Put data structure into the cmn_t structure. * * Revision 1.11.4.2 2005/10/17 04:45:57 arthchan2003 - * Free stuffs in cmn and feat corectly. + * Free stuffs in cmn and feat correctly. * * Revision 1.11.4.1 2005/07/05 06:25:08 arthchan2003 * Fixed dox-doc. diff --git a/include/soundswallower/err.h b/include/soundswallower/err.h index ff95091b..62977faf 100644 --- a/include/soundswallower/err.h +++ b/include/soundswallower/err.h @@ -47,7 +47,7 @@ * @file err.h * @brief Implementation of logging routines. * - * Logging, warning, debug and error message output funtionality is provided in this file. + * Logging, warning, debug and error message output functionality is provided in this file. * Sphinxbase defines several level of logging messages - INFO, WARNING, ERROR, FATAL. By * default output goes to standard error output. * diff --git a/include/soundswallower/feat.h b/include/soundswallower/feat.h index c96e5783..cc43b6fc 100644 --- a/include/soundswallower/feat.h +++ b/include/soundswallower/feat.h @@ -315,7 +315,7 @@ int32 feat_s2mfc2feat_live(feat_t *fcb, /**< In: Descriptor from feat_init() */ mfcc_t **uttcep, /**< In: Incoming cepstral buffer */ int32 *inout_ncep, /**< In: Size of incoming buffer. Out: Number of incoming frames consumed. */ - int32 beginutt, /**< In: Begining of utterance flag */ + int32 beginutt, /**< In: Beginning of utterance flag */ int32 endutt, /**< In: End of utterance flag */ mfcc_t ***ofeat /**< In: Output feature buffer. See VERY IMPORTANT note diff --git a/include/soundswallower/fsg_history.h b/include/soundswallower/fsg_history.h index c4e015ba..f1bdd17e 100644 --- a/include/soundswallower/fsg_history.h +++ b/include/soundswallower/fsg_history.h @@ -184,7 +184,7 @@ void fsg_history_entry_add(fsg_history_t *h, */ void fsg_history_end_frame(fsg_history_t *h); -/* Clear the hitory table */ +/* Clear the history table */ void fsg_history_reset(fsg_history_t *h); /* Return the number of valid entries in the given history table */ diff --git a/include/soundswallower/glist.h b/include/soundswallower/glist.h index 3d69635e..4badbaf2 100644 --- a/include/soundswallower/glist.h +++ b/include/soundswallower/glist.h @@ -133,13 +133,13 @@ glist_t glist_add_uint32(glist_t g, /**< a link list */ * Create and prepend a new list node containing a single-precision float. */ glist_t glist_add_float32(glist_t g, /**< a link list */ - float32 val /**< a float32 vlaue */ + float32 val /**< a float32 value */ ); /** * Create and prepend a new list node containing a double-precision float. */ glist_t glist_add_float64(glist_t g, /**< a link list */ - float64 val /**< a float64 vlaue */ + float64 val /**< a float64 value */ ); /** diff --git a/include/soundswallower/listelem_alloc.h b/include/soundswallower/listelem_alloc.h index 8bed96a1..65802ba1 100644 --- a/include/soundswallower/listelem_alloc.h +++ b/include/soundswallower/listelem_alloc.h @@ -99,7 +99,7 @@ void __listelem_free__(listelem_alloc_t *le, void *elem, char *file, int line); #define listelem_free(le, el) __listelem_free__((le), (el), __FILE__, __LINE__) /** - Print number of allocation, numer of free operation stats + Print number of allocation, number of free operation stats */ void listelem_stats(listelem_alloc_t *le); diff --git a/include/soundswallower/s3file.h b/include/soundswallower/s3file.h index 329c7086..f4da2d57 100644 --- a/include/soundswallower/s3file.h +++ b/include/soundswallower/s3file.h @@ -182,7 +182,7 @@ char *s3file_copy_nextword(s3file_t *s, const char **ptr); /** * Extract values with byteswapping and checksum. */ -size_t s3file_get(void *buf, /**< In: adddress to write values to. */ +size_t s3file_get(void *buf, /**< In: address to write values to. */ size_t el_sz, /**< In: element size */ size_t n_el, /**< In: number of elements */ s3file_t *s); diff --git a/include/soundswallower/yin.h b/include/soundswallower/yin.h index 1eca29b7..f2997f0a 100644 --- a/include/soundswallower/yin.h +++ b/include/soundswallower/yin.h @@ -96,7 +96,7 @@ void yin_write(yin_t *pe, int16 const *frame); * associated with *out_pitch, in Q15 * format (i.e. scaled by 32768). This can be * interpreted as one minus the probability of voicing. - * @return Non-zero if enough data was avaliable to return a pitch + * @return Non-zero if enough data was available to return a pitch * estimate, zero otherwise. */ int yin_read(yin_t *pe, uint16 *out_period, uint16 *out_bestdiff); diff --git a/js/api.js b/js/api.js index 545e6420..4ff0de76 100644 --- a/js/api.js +++ b/js/api.js @@ -548,7 +548,7 @@ class Endpointer { * @param {number} config.samprate Sampling rate of the input audio. * @param {number} config.frame_length Length in seconds of an input * frame, must be 0.01, 0.02, or 0.03. - * @param {number} config.mode Aggressiveness of voice activity detction, + * @param {number} config.mode Aggressiveness of voice activity detection, * must be 0, 1, 2, or 3. Higher numbers will create "tighter" * endpoints at the possible expense of clipping the start of * utterances. diff --git a/py/soundswallower/__init__.py b/py/soundswallower/__init__.py index c4a18114..51b47cf5 100644 --- a/py/soundswallower/__init__.py +++ b/py/soundswallower/__init__.py @@ -48,7 +48,7 @@ def get_audio_data(input_file: str) -> Tuple[bytes, Optional[int]]: """Try to get single-channel audio data in the most portable way possible. - Currently suports only single-channel WAV and raw audio. + Currently supports only single-channel WAV and raw audio. Args: input_file: Path to an audio file. diff --git a/py/soundswallower/cli.py b/py/soundswallower/cli.py index d98b9f77..f6aa11d7 100644 --- a/py/soundswallower/cli.py +++ b/py/soundswallower/cli.py @@ -126,7 +126,7 @@ def make_decoder_config(args: argparse.Namespace) -> Config: def write_config(config: Config, output: Optional[str] = None) -> None: - """Write the full configuraiton as JSON to output file or standard output.""" + """Write the full configuration as JSON to output file or standard output.""" outfh: Any if output is not None: outfh = open(output, "wt") diff --git a/src/acmod.c b/src/acmod.c index bc696a87..ae579b70 100644 --- a/src/acmod.c +++ b/src/acmod.c @@ -680,7 +680,7 @@ acmod_process_cep(acmod_t *acmod, inptr = (acmod->feat_outidx + acmod->n_feat_frame) % acmod->n_feat_alloc; } - /* FIXME: we can't split the last frame drop properly to be on the bounary, so just return */ + /* FIXME: we can't split the last frame drop properly to be on the boundary, so just return */ if (inptr + nfeat > acmod->n_feat_alloc && acmod->state == ACMOD_ENDED) { *inout_n_frames -= ncep; *inout_cep += ncep; diff --git a/src/common_audio/signal_processing/include/signal_processing_library.h b/src/common_audio/signal_processing/include/signal_processing_library.h index ff6386ec..9a95812d 100644 --- a/src/common_audio/signal_processing/include/signal_processing_library.h +++ b/src/common_audio/signal_processing/include/signal_processing_library.h @@ -48,7 +48,7 @@ #define WEBRTC_SPL_MUL_16_U16(a, b) ((int32_t)(int16_t)(a) * (uint16_t)(b)) // clang-format off -// clang-format would choose some identation +// clang-format would choose some indentation // leading to presubmit error (cpplint.py) #ifndef WEBRTC_ARCH_ARM_V7 // For ARMv7 platforms, these are inline functions in spl_inl_armv7.h @@ -242,7 +242,7 @@ int32_t WebRtcSpl_MinValueW32_mips(const int32_t* vector, size_t length); // Input: // - vector : 16-bit input vector. // - length : Number of samples in vector. -// Ouput: +// Output: // - max_val : Maximum sample value in `vector`. // - min_val : Minimum sample value in `vector`. void WebRtcSpl_MinMaxW16(const int16_t* vector, @@ -305,7 +305,7 @@ size_t WebRtcSpl_MaxIndexW32(const int32_t* vector, size_t length); // - vector : 16-bit input vector. // - length : Number of samples in vector. // -// Return value : Index to the mimimum value in vector (if multiple +// Return value : Index to the minimum value in vector (if multiple // indexes have the minimum, return the first). size_t WebRtcSpl_MinIndexW16(const int16_t* vector, size_t length); @@ -315,7 +315,7 @@ size_t WebRtcSpl_MinIndexW16(const int16_t* vector, size_t length); // - vector : 32-bit input vector. // - length : Number of samples in vector. // -// Return value : Index to the mimimum value in vector (if multiple +// Return value : Index to the minimum value in vector (if multiple // indexes have the minimum, return the first). size_t WebRtcSpl_MinIndexW32(const int32_t* vector, size_t length); diff --git a/src/common_audio/signal_processing/min_max_operations.c b/src/common_audio/signal_processing/min_max_operations.c index 1b9542e7..e794dae9 100644 --- a/src/common_audio/signal_processing/min_max_operations.c +++ b/src/common_audio/signal_processing/min_max_operations.c @@ -136,7 +136,7 @@ int32_t WebRtcSpl_MinValueW32C(const int32_t* vector, size_t length) { // Index of maximum absolute value in a word16 vector. size_t WebRtcSpl_MaxAbsIndexW16(const int16_t* vector, size_t length) { - // Use type int for local variables, to accomodate the value of abs(-32768). + // Use type int for local variables, to accommodate the value of abs(-32768). size_t i = 0, index = 0; int absolute = 0, maximum = 0; diff --git a/src/decoder.c b/src/decoder.c index 372fc011..b423525f 100644 --- a/src/decoder.c +++ b/src/decoder.c @@ -759,7 +759,7 @@ decoder_alignment(decoder_t *d) int32 wid = dict_wordid(d->dict, seg->word); /* This is actually possible, because of (null) transitions. */ if (wid != BAD_S3WID) { - /* The important thing is that they be continguous. */ + /* The important thing is that they be contiguous. */ assert(seg->sf == prev_ef + 1); prev_ef = seg->ef; alignment_add_word(al, wid, seg->sf, seg->ef - seg->sf + 1); diff --git a/src/fe_noise.c b/src/fe_noise.c index a8f69900..2d83c8f2 100644 --- a/src/fe_noise.c +++ b/src/fe_noise.c @@ -36,7 +36,7 @@ */ /* This noise removal algorithm is inspired by the following papers - * Computationally Efficient Speech Enchancement by Spectral Minina Tracking + * Computationally Efficient Speech Enhancement by Spectral Minina Tracking * by G. Doblinger * * Power-Normalized Cepstral Coefficients (PNCC) for Robust Speech Recognition @@ -60,7 +60,7 @@ #include #include -/* Noise supression constants */ +/* Noise suppression constants */ #define SMOOTH_WINDOW 4 #define LAMBDA_POWER 0.7 #define LAMBDA_A 0.995 diff --git a/src/feat.c b/src/feat.c index f6f3dca1..94adfc61 100644 --- a/src/feat.c +++ b/src/feat.c @@ -50,7 +50,7 @@ * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: a, Free buffers correctly. b, Fixed dox-doc. * * Revision 1.21.4.3 2005/10/17 04:45:57 arthchan2003 - * Free stuffs in cmn and feat corectly. + * Free stuffs in cmn and feat correctly. * * Revision 1.21.4.2 2005/09/26 02:19:57 arthchan2003 * Add message to show the directory which the feature is searched for. diff --git a/src/fsg_search.c b/src/fsg_search.c index 16b42464..d18b933c 100644 --- a/src/fsg_search.c +++ b/src/fsg_search.c @@ -189,7 +189,7 @@ fsg_search_init(const char *name, return NULL; } - /* Intialize the search history object */ + /* Initialize the search history object */ fsgs->history = fsg_history_init(NULL, dict); fsgs->frame = -1; diff --git a/src/mdef.c b/src/mdef.c index a2c35c04..a1ad163f 100644 --- a/src/mdef.c +++ b/src/mdef.c @@ -516,7 +516,7 @@ mdef_init(char *mdeffile, int cionly) return NULL; } if (strncmp(buf, MODEL_DEF_VERSION, strlen(MODEL_DEF_VERSION)) != 0) - E_FATAL("Version error: Expecing %s, but read %s\n", + E_FATAL("Version error: Expecting %s, but read %s\n", MODEL_DEF_VERSION, buf); /* Read #base phones, #triphones, #senone mappings defined in header */ diff --git a/src/ms_gauden.c b/src/ms_gauden.c index e5595500..fad79555 100644 --- a/src/ms_gauden.c +++ b/src/ms_gauden.c @@ -125,7 +125,7 @@ gauden_param_read(s3file_t *s, /* #Codebooks */ if (s3file_get(&n_mgau, sizeof(int32), 1, s) != 1) { - E_ERROR("Failed to read number fo codebooks\n"); + E_ERROR("Failed to read number of codebooks\n"); return NULL; } *out_n_mgau = n_mgau; diff --git a/src/ps_lattice.c b/src/ps_lattice.c index 3504b8b9..261da0d2 100644 --- a/src/ps_lattice.c +++ b/src/ps_lattice.c @@ -445,7 +445,7 @@ lattice_hyp(lattice_t *dag, latlink_t *link) /* Backtrace again to construct hypothesis string. */ ckd_free(dag->hyp_str); - dag->hyp_str = ckd_calloc(1, len + 1); /* extra one incase the hyp is empty */ + dag->hyp_str = ckd_calloc(1, len + 1); /* extra one in case the hyp is empty */ c = dag->hyp_str + len - 1; if (dict_real_word(dag->dict, link->to->basewid)) { char *wstr = dict_wordstr(dag->dict, link->to->basewid); @@ -530,7 +530,7 @@ lattice_seg_next(seg_iter_t *seg) lattice_seg_free(seg); return NULL; } else if (itor->cur == itor->n_links) { - /* Re-use the last link but with the "to" node. */ + /* Reuse the last link but with the "to" node. */ lattice_link2itor(seg, itor->links[itor->cur - 1], TRUE); } else { lattice_link2itor(seg, itor->links[itor->cur], FALSE); diff --git a/src/rtc_base/checks.h b/src/rtc_base/checks.h index cf7a4a2f..b663fc95 100644 --- a/src/rtc_base/checks.h +++ b/src/rtc_base/checks.h @@ -11,7 +11,7 @@ #ifndef RTC_BASE_CHECKS_H_ #define RTC_BASE_CHECKS_H_ -// If you for some reson need to know if DCHECKs are on, test the value of +// If you for some reason need to know if DCHECKs are on, test the value of // RTC_DCHECK_IS_ON. (Test its value, not if it's defined; it'll always be // defined, to either a true or a false value.) #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) diff --git a/src/yin.c b/src/yin.c index 4cf26f9c..8ceaa5a0 100644 --- a/src/yin.c +++ b/src/yin.c @@ -80,7 +80,7 @@ cmn_diff(int16 const *signal, int32 *out_diff, int ndiff) for (tscale = 0; tscale < 32; ++tscale) if (ndiff & (1 << (31 - tscale))) break; - --tscale; /* Avoid teh overflowz. */ + --tscale; /* Avoid the overflowz. */ /* printf("tscale is %d (ndiff - 1) << tscale is %d\n", tscale, (ndiff-1) << tscale); */ @@ -226,7 +226,7 @@ yin_read(yin_t *pe, uint16 *out_period, uint16 *out_bestdiff) half_wsize = (pe->wsize - 1) / 2; /* Without any smoothing, just return the current value (don't - * need to do anything to the current poitner either). */ + * need to do anything to the current pointer either). */ if (half_wsize == 0) { if (pe->endut) return 0; diff --git a/tests/test_feat_fe.c b/tests/test_feat_fe.c index 5c900f78..69bbbf44 100644 --- a/tests/test_feat_fe.c +++ b/tests/test_feat_fe.c @@ -83,7 +83,7 @@ main(int argc, char *argv[]) ncep = 1; nfr = feat_s2mfc2feat_live(fcb, cptr, &ncep, TRUE, FALSE, fptr); TEST_EQUAL(nfr, 0); /* Not possible to make any frames yet. */ - TEST_EQUAL(ncep, 1); /* But we shold have consumed one. */ + TEST_EQUAL(ncep, 1); /* But we should have consumed one. */ cptr += ncep; for (i = 1; i < total_frames - 1; ++i) { ncep = 1;