diff --git a/native_client/python/__init__.py b/native_client/python/__init__.py index d10a4c98..14618ded 100644 --- a/native_client/python/__init__.py +++ b/native_client/python/__init__.py @@ -75,9 +75,6 @@ class Model(object): :param aBufferSize: The number of samples in the audio signal. :type aBufferSize: int - :param aSampleRate: The sample-rate of the audio signal. - :type aSampleRate: int - :return: The STT result. :type: str """ @@ -93,28 +90,21 @@ class Model(object): :param aBufferSize: The number of samples in the audio signal. :type aBufferSize: int - :param aSampleRate: The sample-rate of the audio signal. - :type aSampleRate: int - :return: Outputs a struct of individual letters along with their timing information. :type: :func:`Metadata` """ return deepspeech.impl.SpeechToTextWithMetadata(self._impl, *args, **kwargs) - def createStream(self, sample_rate=16000): + def createStream(self): """ Create a new streaming inference state. The streaming state returned by this function can then be passed to :func:`feedAudioContent()` and :func:`finishStream()`. - :param aSampleRate: The sample-rate of the audio signal. - :type aSampleRate: int - :return: Object holding the stream :throws: RuntimeError on error """ - status, ctx = deepspeech.impl.CreateStream(self._impl, - aSampleRate=sample_rate) + status, ctx = deepspeech.impl.CreateStream(self._impl) if status != 0: raise RuntimeError("CreateStream failed with error code {}".format(status)) return ctx diff --git a/native_client/python/client.py b/native_client/python/client.py index 3d6e71f9..b44c5122 100644 --- a/native_client/python/client.py +++ b/native_client/python/client.py @@ -102,9 +102,9 @@ def main(): print('Running inference.', file=sys.stderr) inference_start = timer() if args.extended: - print(metadata_to_string(ds.sttWithMetadata(audio, fs))) + print(metadata_to_string(ds.sttWithMetadata(audio))) else: - print(ds.stt(audio, fs)) + print(ds.stt(audio)) inference_end = timer() - inference_start print('Inference took %0.3fs for %0.3fs audio file.' % (inference_end, audio_length), file=sys.stderr)