mirror of
https://github.com/mozilla/DeepSpeech.git
synced 2025-10-26 11:19:39 +00:00
Changed variable names to match coding style
This commit is contained in:
parent
004d66d224
commit
969b2ac4ba
@ -80,7 +80,7 @@ struct StreamingState {
|
||||
char* intermediateDecode() const;
|
||||
void finalizeStream();
|
||||
char* finishStream();
|
||||
Result* finishStreamWithMetadata(unsigned int numResults);
|
||||
Result* finishStreamWithMetadata(unsigned int num_results);
|
||||
|
||||
void processAudioWindow(const vector<float>& buf);
|
||||
void processMfccWindow(const vector<float>& buf);
|
||||
@ -144,7 +144,7 @@ StreamingState::finishStream()
|
||||
}
|
||||
|
||||
Result*
|
||||
StreamingState::finishStreamWithMetadata(unsigned int numResults)
|
||||
StreamingState::finishStreamWithMetadata(unsigned int num_results)
|
||||
{
|
||||
finalizeStream();
|
||||
|
||||
@ -427,9 +427,9 @@ DS_FinishStream(StreamingState* aSctx)
|
||||
|
||||
Result*
|
||||
DS_FinishStreamWithMetadata(StreamingState* aSctx,
|
||||
unsigned int numResults)
|
||||
unsigned int aNumResults)
|
||||
{
|
||||
Result* result = aSctx->finishStreamWithMetadata(numResults);
|
||||
Result* result = aSctx->finishStreamWithMetadata(aNumResults);
|
||||
DS_FreeStream(aSctx);
|
||||
return result;
|
||||
}
|
||||
@ -461,10 +461,10 @@ Result*
|
||||
DS_SpeechToTextWithMetadata(ModelState* aCtx,
|
||||
const short* aBuffer,
|
||||
unsigned int aBufferSize,
|
||||
unsigned int numResults)
|
||||
unsigned int aNumResults)
|
||||
{
|
||||
StreamingState* ctx = CreateStreamAndFeedAudioContent(aCtx, aBuffer, aBufferSize);
|
||||
return DS_FinishStreamWithMetadata(ctx, numResults);
|
||||
return DS_FinishStreamWithMetadata(ctx, aNumResults);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -197,6 +197,7 @@ char* DS_SpeechToText(ModelState* aCtx,
|
||||
* @param aBuffer A 16-bit, mono raw audio signal at the appropriate
|
||||
* sample rate (matching what the model was trained on).
|
||||
* @param aBufferSize The number of samples in the audio signal.
|
||||
* @param aNumResults The number of alternative transcriptions to return.
|
||||
*
|
||||
* @return Outputs a struct of individual letters along with their timing information.
|
||||
* The user is responsible for freeing Metadata by calling {@link DS_FreeMetadata()}. Returns NULL on error.
|
||||
@ -205,7 +206,7 @@ DEEPSPEECH_EXPORT
|
||||
Result* DS_SpeechToTextWithMetadata(ModelState* aCtx,
|
||||
const short* aBuffer,
|
||||
unsigned int aBufferSize,
|
||||
unsigned int numResults);
|
||||
unsigned int aNumResults);
|
||||
|
||||
/**
|
||||
* @brief Create a new streaming inference state. The streaming state returned
|
||||
@ -265,6 +266,7 @@ char* DS_FinishStream(StreamingState* aSctx);
|
||||
* inference, returns per-letter metadata.
|
||||
*
|
||||
* @param aSctx A streaming state pointer returned by {@link DS_CreateStream()}.
|
||||
* @param aNumResults The number of alternative transcriptions to return.
|
||||
*
|
||||
* @return Outputs a struct of individual letters along with their timing information.
|
||||
* The user is responsible for freeing Metadata by calling {@link DS_FreeMetadata()}. Returns NULL on error.
|
||||
@ -273,7 +275,7 @@ char* DS_FinishStream(StreamingState* aSctx);
|
||||
*/
|
||||
DEEPSPEECH_EXPORT
|
||||
Result* DS_FinishStreamWithMetadata(StreamingState* aSctx,
|
||||
unsigned int numResults);
|
||||
unsigned int aNumResults);
|
||||
|
||||
/**
|
||||
* @brief Destroy a streaming state without decoding the computed logits. This
|
||||
|
||||
Loading…
Reference in New Issue
Block a user