edu.cmu.sphinx.frontend

## Class FloatData

• java.lang.Object
• edu.cmu.sphinx.frontend.FloatData
• All Implemented Interfaces:
Data, java.lang.Cloneable

```public class FloatData
extends java.lang.Object
implements Data, java.lang.Cloneable```
A Data object that holds data of primitive type float.
`Data`
• ### Constructor Summary

Constructors
Constructor and Description
```FloatData(float[] values, int sampleRate, long firstSampleNumber)```
Constructs a Data object with the given values, sample rate, collect time, and first sample number.
```FloatData(float[] values, int sampleRate, long collectTime, long firstSampleNumber)```
Constructs a Data object with the given values, sample rate, collect time, and first sample number.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`FloatData` `clone()`
`long` `getCollectTime()`
Returns the time in milliseconds at which the audio data is collected.
`long` `getFirstSampleNumber()`
`int` `getSampleRate()`
`float[]` `getValues()`
`static FloatData` `toFloatData(Data data)`
Converts a given Data-object into a `FloatData` if possible.
• ### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### FloatData

```public FloatData(float[] values,
int sampleRate,
long firstSampleNumber)```
Constructs a Data object with the given values, sample rate, collect time, and first sample number.
Parameters:
`values` - the data values
`sampleRate` - the sample rate of the data
`firstSampleNumber` - the position of the first sample in the original data
• #### FloatData

```public FloatData(float[] values,
int sampleRate,
long collectTime,
long firstSampleNumber)```
Constructs a Data object with the given values, sample rate, collect time, and first sample number.
Parameters:
`values` - the data values
`sampleRate` - the sample rate of the data
`collectTime` - the time at which this data is collected
`firstSampleNumber` - the position of the first sample in the original data
• ### Method Detail

• #### getValues

`public float[] getValues()`
Returns:
the values of this data.
• #### getSampleRate

`public int getSampleRate()`
Returns:
the sample rate of this data.
• #### getFirstSampleNumber

`public long getFirstSampleNumber()`
Returns:
the position of the first sample in the original data. The very first sample number is zero.
• #### getCollectTime

`public long getCollectTime()`
Returns the time in milliseconds at which the audio data is collected.
Returns:
the difference, in milliseconds, between the time the audio data is collected and midnight, January 1, 1970
• #### clone

```public FloatData clone()
throws java.lang.CloneNotSupportedException```
Overrides:
`clone` in class `java.lang.Object`
Throws:
`java.lang.CloneNotSupportedException`
• #### toFloatData

`public static FloatData toFloatData(Data data)`
Converts a given Data-object into a `FloatData` if possible.
Parameters:
`data` - data to convert
Returns:
converted data
{"ft_lang_label":"__label__en","ft_lang_prob":0.51614827,"math_prob":0.8675146,"size":1482,"snap":"2023-40-2023-50","text_gpt3_token_len":328,"char_repetition_ratio":0.17388363,"word_repetition_ratio":0.42424244,"special_character_ratio":0.19838056,"punctuation_ratio":0.11872146,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9676937,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-28T12:04:34Z\",\"WARC-Record-ID\":\"<urn:uuid:c521b18b-aa29-468a-a207-6c35962dbe66>\",\"Content-Length\":\"16836\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ba9f10ef-0f95-41e5-a50c-c8353bbe6566>\",\"WARC-Concurrent-To\":\"<urn:uuid:e84801a5-95e3-4a6d-aec3-d0a8339d334f>\",\"WARC-IP-Address\":\"185.199.111.153\",\"WARC-Target-URI\":\"https://cmusphinx.github.io/doc/sphinx4/javadoc/edu/cmu/sphinx/frontend/FloatData.html\",\"WARC-Payload-Digest\":\"sha1:CPWR2UX7HG2YJJBP4U44QOGYJCHODL35\",\"WARC-Block-Digest\":\"sha1:534QCOUVVFYROTIDRPIB3S3HKC24WQ6X\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510387.77_warc_CC-MAIN-20230928095004-20230928125004-00394.warc.gz\"}"}