<commit_before>
const utterance = new SpeechSynthesisUtterance();
utterance.lang = "en";

const recorder = new webkitSpeechRecognition();
recorder.lang = 'en';

const record = cb => {
  recorder.onresult = e => {
    if (e.results.length > 0) {
      const result = event.results[event.results.length-1];

      if (result.isFinal) {
        console.log(result[0].transcript, 'final');
        cb(result[0].transcript);
      }
    }
  };

  recorder.start();
};

const stopRecording = () => {
  recorder.stop();
}

const abortRecording = () => {
  recorder.abort();
}

// text to voice
const speak = text => {
  utterance.text = text;<commit_msg>:warning: set recording to continuous<commit_after>
const utterance = new SpeechSynthesisUtterance();
utterance.lang = "en";

const recorder = new webkitSpeechRecognition();
recorder.lang = 'en';
recorder.continuous = true;

const record = cb => {
  recorder.onresult = e => {
    if (e.results.length > 0) {
      const result = event.results[event.results.length-1];

      if (result.isFinal) {
        console.log(result[0].transcript, 'final');
        cb(result[0].transcript);
      }
    }
  };

  recorder.start();
};

const stopRecording = () => {
  recorder.stop();
}

const abortRecording = () => {
  recorder.abort();
}

// text to voice
const speak = text => {
  utterance.text = text;
{'fraction_non_alphanumeric': 0.15973254086181277, 'fraction_numerical': 0.005943536404160475, 'mean_word_length': 3.196261682242991, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7339849', 'n_tokens_mistral': 461, 'n_tokens_neox': 442, 'n_words': 93}