Update Java docs
This commit is contained in:
parent
417b8e4fe3
commit
16f89dff9e
|
@ -13,17 +13,17 @@ Metadata
|
||||||
|
|
||||||
.. doxygenclass:: org::mozilla::deepspeech::libdeepspeech::Metadata
|
.. doxygenclass:: org::mozilla::deepspeech::libdeepspeech::Metadata
|
||||||
:project: deepspeech-java
|
:project: deepspeech-java
|
||||||
:members: getTranscripts, getNum_transcripts, getTranscript
|
:members: getNumTranscripts, getTranscript
|
||||||
|
|
||||||
CandidateTranscript
|
CandidateTranscript
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. doxygenclass:: org::mozilla::deepspeech::libdeepspeech::CandidateTranscript
|
.. doxygenclass:: org::mozilla::deepspeech::libdeepspeech::CandidateTranscript
|
||||||
:project: deepspeech-java
|
:project: deepspeech-java
|
||||||
:members: getTokens, getNum_tokens, getConfidence, getToken
|
:members: getNumTokens, getConfidence, getToken
|
||||||
|
|
||||||
TokenMetadata
|
TokenMetadata
|
||||||
-------------
|
-------------
|
||||||
.. doxygenclass:: org::mozilla::deepspeech::libdeepspeech::TokenMetadata
|
.. doxygenclass:: org::mozilla::deepspeech::libdeepspeech::TokenMetadata
|
||||||
:project: deepspeech-java
|
:project: deepspeech-java
|
||||||
:members: getText, getTimestep, getStart_time
|
:members: getText, getTimestep, getStartTime
|
||||||
|
|
|
@ -35,19 +35,11 @@ public class CandidateTranscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Array of TokenMetadata objects
|
|
||||||
*/
|
|
||||||
public TokenMetadata getTokens() {
|
|
||||||
long cPtr = implJNI.CandidateTranscript_tokens_get(swigCPtr, this);
|
|
||||||
return (cPtr == 0) ? null : new TokenMetadata(cPtr, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of the tokens array
|
* Size of the tokens array
|
||||||
*/
|
*/
|
||||||
public long getNum_tokens() {
|
public long getNumTokens() {
|
||||||
return implJNI.CandidateTranscript_num_tokens_get(swigCPtr, this);
|
return implJNI.CandidateTranscript_NumTokens_get(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,7 +48,7 @@ public class CandidateTranscript {
|
||||||
* contributed to the creation of this transcript.
|
* contributed to the creation of this transcript.
|
||||||
*/
|
*/
|
||||||
public double getConfidence() {
|
public double getConfidence() {
|
||||||
return implJNI.CandidateTranscript_confidence_get(swigCPtr, this);
|
return implJNI.CandidateTranscript_Confidence_get(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,6 +16,11 @@ public enum DeepSpeech_Error_Codes {
|
||||||
ERR_INVALID_SCORER(0x2002),
|
ERR_INVALID_SCORER(0x2002),
|
||||||
ERR_MODEL_INCOMPATIBLE(0x2003),
|
ERR_MODEL_INCOMPATIBLE(0x2003),
|
||||||
ERR_SCORER_NOT_ENABLED(0x2004),
|
ERR_SCORER_NOT_ENABLED(0x2004),
|
||||||
|
ERR_SCORER_UNREADABLE(0x2005),
|
||||||
|
ERR_SCORER_INVALID_LM(0x2006),
|
||||||
|
ERR_SCORER_NO_TRIE(0x2007),
|
||||||
|
ERR_SCORER_INVALID_TRIE(0x2008),
|
||||||
|
ERR_SCORER_VERSION_MISMATCH(0x2009),
|
||||||
ERR_FAIL_INIT_MMAP(0x3000),
|
ERR_FAIL_INIT_MMAP(0x3000),
|
||||||
ERR_FAIL_INIT_SESS(0x3001),
|
ERR_FAIL_INIT_SESS(0x3001),
|
||||||
ERR_FAIL_INTERPRETER(0x3002),
|
ERR_FAIL_INTERPRETER(0x3002),
|
||||||
|
|
|
@ -39,19 +39,11 @@ public class Metadata {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Array of CandidateTranscript objects
|
|
||||||
*/
|
|
||||||
public CandidateTranscript getTranscripts() {
|
|
||||||
long cPtr = implJNI.Metadata_transcripts_get(swigCPtr, this);
|
|
||||||
return (cPtr == 0) ? null : new CandidateTranscript(cPtr, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of the transcripts array
|
* Size of the transcripts array
|
||||||
*/
|
*/
|
||||||
public long getNum_transcripts() {
|
public long getNumTranscripts() {
|
||||||
return implJNI.Metadata_num_transcripts_get(swigCPtr, this);
|
return implJNI.Metadata_NumTranscripts_get(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
/* ----------------------------------------------------------------------------
|
|
||||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
|
||||||
* Version 4.0.2
|
|
||||||
*
|
|
||||||
* Do not make changes to this file unless you know what you are doing--modify
|
|
||||||
* the SWIG interface file instead.
|
|
||||||
* ----------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
package org.mozilla.deepspeech.libdeepspeech;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stores each individual character, along with its timing information
|
|
||||||
*/
|
|
||||||
public class MetadataItem {
|
|
||||||
private transient long swigCPtr;
|
|
||||||
protected transient boolean swigCMemOwn;
|
|
||||||
|
|
||||||
protected MetadataItem(long cPtr, boolean cMemoryOwn) {
|
|
||||||
swigCMemOwn = cMemoryOwn;
|
|
||||||
swigCPtr = cPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static long getCPtr(MetadataItem obj) {
|
|
||||||
return (obj == null) ? 0 : obj.swigCPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public synchronized void delete() {
|
|
||||||
if (swigCPtr != 0) {
|
|
||||||
if (swigCMemOwn) {
|
|
||||||
swigCMemOwn = false;
|
|
||||||
throw new UnsupportedOperationException("C++ destructor does not have public access");
|
|
||||||
}
|
|
||||||
swigCPtr = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The character generated for transcription
|
|
||||||
*/
|
|
||||||
public void setCharacter(String value) {
|
|
||||||
implJNI.MetadataItem_character_set(swigCPtr, this, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The character generated for transcription
|
|
||||||
*/
|
|
||||||
public String getCharacter() {
|
|
||||||
return implJNI.MetadataItem_character_get(swigCPtr, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Position of the character in units of 20ms
|
|
||||||
*/
|
|
||||||
public void setTimestep(int value) {
|
|
||||||
implJNI.MetadataItem_timestep_set(swigCPtr, this, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Position of the character in units of 20ms
|
|
||||||
*/
|
|
||||||
public int getTimestep() {
|
|
||||||
return implJNI.MetadataItem_timestep_get(swigCPtr, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Position of the character in seconds
|
|
||||||
*/
|
|
||||||
public void setStart_time(float value) {
|
|
||||||
implJNI.MetadataItem_start_time_set(swigCPtr, this, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Position of the character in seconds
|
|
||||||
*/
|
|
||||||
public float getStart_time() {
|
|
||||||
return implJNI.MetadataItem_start_time_get(swigCPtr, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -38,21 +38,21 @@ public class TokenMetadata {
|
||||||
* The text corresponding to this token
|
* The text corresponding to this token
|
||||||
*/
|
*/
|
||||||
public String getText() {
|
public String getText() {
|
||||||
return implJNI.TokenMetadata_text_get(swigCPtr, this);
|
return implJNI.TokenMetadata_Text_get(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Position of the token in units of 20ms
|
* Position of the token in units of 20ms
|
||||||
*/
|
*/
|
||||||
public long getTimestep() {
|
public long getTimestep() {
|
||||||
return implJNI.TokenMetadata_timestep_get(swigCPtr, this);
|
return implJNI.TokenMetadata_Timestep_get(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Position of the token in seconds
|
* Position of the token in seconds
|
||||||
*/
|
*/
|
||||||
public float getStart_time() {
|
public float getStartTime() {
|
||||||
return implJNI.TokenMetadata_start_time_get(swigCPtr, this);
|
return implJNI.TokenMetadata_StartTime_get(swigCPtr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue