letalker.core#

core Module

The core module contains functions and classes which controls the basic flow of the voice synthesis.

get_sampling_rate

Return the global sampling rate in samples/second

set_sampling_rate

Sets the global sampling rate

TimeSampleHandler

Abstract base class of all the pyLeTalker classes

letalker.core.get_sampling_rate()#

Return the global sampling rate in samples/second

A common sampling rate is used for the entire pyLeTalker framework. As such, this method outputs the same value as letalker.fs() and letalker.get_sampling_rate().

Return type:

int

letalker.core.set_sampling_rate(fs)#

Sets the global sampling rate

This function will change the common sampling rate across the entire pyLeTalker framework. It this method outputs the same value as letalker.fs() and letalker.get_sampling_rate().

Parameters#

fs

New sampling rate in samples/second. Must be a positive value. If None, it reverts the sampling rate to the system default (44.1 khz)

Parameters:

fs (int | None)

class letalker.core.TimeSampleHandler#

Abstract base class of all the pyLeTalker classes

classmethod get_fs()#

get class-wide sampling rate

Return type:

int

classmethod set_fs(new_fs)#

set class-wide sampling rate.

Parameters:

new_fs (int | None) – sampling rate in samples/second. If None, it reverts the sampling rate to the default (44.1 kHz).

static ts(nb_samples, n0=0, sample_edges=False, upsample_factor=0)#

Return time vector in seconds.

Parameters#

nb_samples

Number of samples

n0, optional

Starting time sample index, by default 0

sample_edges, optional

True to return time stamps associated with the edges of the samples, by default False

upsample_factor, optional

Specify a positive integer to increase the sampling rate of the returned time vector, by default 0

Parameters:
  • nb_samples (int)

  • n0 (int)

  • sample_edges (bool)

  • upsample_factor (int)

Return type:

NDArray

property fs: int#

sampling rate in samples/second

Functions

compile_cfunc(func, c_sig, **kwargs)

compile_jitclass_if_numba(CLS[, spec])

compile_njit_if_numba(func, **kwargs)

get_sampling_rate()

Return the global sampling rate in samples/second

set_sampling_rate(fs)

Sets the global sampling rate

ts(nb_samples[, n0])

Return time vector in seconds.

use_numba(mode)

Enable/disable Numba

using_numba()

Returns True if Numba is enabled

Classes

TimeSampleHandler()

Abstract base class of all the pyLeTalker classes