<commit_before>
/**
 * Module dependencies.
 */

var util = require('util');
var assert = require('assert');
var Parser = require('stream-parser');
var Transform = require('readable-stream/transform');
var debug = require('debug')('wave:reader');
var inherits = util.inherits;
var f = util.format;

var formats = {
  WAVE_FORMAT_PCM: 0x0001, // PCM
  WAVE_FORMAT_IEEE_FLOAT: 0x0003, // IEEE float
  WAVE_FORMAT_ALAW: 0x0006, // 8-bit ITU-T G.711 A-law
  WAVE_FORMAT_MULAW: 0x0007, // 8-bit ITU-T G.711 µ-law
  WAVE_FORMAT_EXTENSIBLE: 0xFFFE // Determined by SubFormat
};

/**
 * Module exports.
 */

module.exports = Reader;

/**
 * The `Reader` class accepts a WAV audio file written to it and outputs the raw
 * audio data with the WAV header stripped (most of the time, PCM audio data will
 * be output, depending on the `audioFormat` property).
 *
 * A `"format"` event gets emitted after the WAV header has been parsed.
 *
 * @param {Object} opts optional options object
 * @api public
 */<commit_msg>reader: add a few more formats defined by the RFC<commit_after>
/**
 * Module dependencies.
 */

var util = require('util');
var assert = require('assert');
var Parser = require('stream-parser');
var Transform = require('readable-stream/transform');
var debug = require('debug')('wave:reader');
var inherits = util.inherits;
var f = util.format;

/**
 * Values for the `audioFormat` byte.
 */

var formats = {
  WAVE_FORMAT_UNKNOWN:    0x0000, // Microsoft Unknown Wave Format
  WAVE_FORMAT_PCM:        0x0001, // Microsoft PCM Format
  WAVE_FORMAT_ADPCM:      0x0002, // Microsoft ADPCM Format
  WAVE_FORMAT_IEEE_FLOAT: 0x0003, // IEEE float
  WAVE_FORMAT_VSELP:      0x0004, // Compaq Computer's VSELP
  WAVE_FORMAT_IBM_CVSD:   0x0005, // IBM CVSD
  WAVE_FORMAT_ALAW:       0x0006, // 8-bit ITU-T G.711 A-law
  WAVE_FORMAT_MULAW:      0x0007, // 8-bit ITU-T G.711 µ-law
  WAVE_FORMAT_EXTENSIBLE: 0xFFFE  // Determined by SubFormat
};

/**
 * Module exports.
 */

module.exports = Reader;

/**
 * The `Reader` class accepts a WAV audio file written to it and outputs the raw
 * audio data with the WAV header stripped (most of the time, PCM audio data will
 * be output, depending on the `audioFormat` property).
 *
 * A `"format"` event gets emitted after the WAV header has been parsed.
 *
 * @param {Object} opts optional options object
 * @api public
 */
{'fraction_non_alphanumeric': 0.11797040169133192, 'fraction_numerical': 0.03298097251585624, 'mean_word_length': 3.65748031496063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2793270', 'n_tokens_mistral': 845, 'n_tokens_neox': 765, 'n_words': 258}