<commit_before>//
//  THSpeechController.swift
//  HelloSpeech
//
//  Created by <NAME> on 6/9/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import AVFoundation

//done w/o initializers 

class THSpeechController{
    var synthesizer = AVSpeechSynthesizer()
    var voices = [AVSpeechSynthesisVoice(language: "en-US"),AVSpeechSynthesisVoice(language: "en-AU") ]
    var speechStrings = [String]()
    
    func beginConversation(){
        speechStrings = self.buildSpeechStrings()
        var currentVoice = 0
        for speechString in speechStrings{
            var utterance = AVSpeechUtterance(string: speechString)
            utterance.voice = voices[currentVoice]
            utterance.rate = 0.05
            utterance.pitchMultiplier = 0.6
            utterance.postUtteranceDelay = 0.2
            synthesizer.speakUtterance(utterance)
            currentVoice += 1
            currentVoice = currentVoice % 2 == 0 ? 0 : 1 // this can be put into a (Swap voice) function

        }
    }
    func buildSpeechStrings() -> [String]{
        var sentences = [String]()
        sentences.append("Greetings, <NAME>")
        sentences.append("Hello, Joshua")
        sentences.append("A strange game. The only winning move is not to play.")
        sentences.append("   ")
        sentences.append("How   about   a   nice   game   of   chess?")
        return sentences
    }
}<commit_msg>edited buildSpeechStrings function<commit_after>//
//  THSpeechController.swift
//  HelloSpeech
//
//  Created by <NAME> on 6/9/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import AVFoundation

//done w/o initializers 

class THSpeechController{
    var synthesizer = AVSpeechSynthesizer()
    var voices = [AVSpeechSynthesisVoice(language: "en-US"),AVSpeechSynthesisVoice(language: "en-AU") ]
    var speechStrings = [String]()
    
    func beginConversation(){
        speechStrings = self.buildSpeechStrings()
        var currentVoice = 0
        for speechString in speechStrings{
            var utterance = AVSpeechUtterance(string: speechString)
            utterance.voice = voices[currentVoice]
            utterance.rate = 0.05
            utterance.pitchMultiplier = 0.6
            utterance.postUtteranceDelay = 0.2
            synthesizer.speakUtterance(utterance)
            currentVoice += 1
            currentVoice = currentVoice % 2 == 0 ? 0 : 1 // this can be put into a (Swap voice) function

        }
    }
    func buildSpeechStrings() -> [String]{
        var sentences = [String]()
        sentences.append("Greetings, <NAME>")
        sentences.append("Hello, Joshua")
        sentences.append("A strange game. The only winning move is not to play.")
        sentences.append("   ")
        sentences.append("How about a nice game of chess?")
        return sentences
    }
}
{'fraction_non_alphanumeric': 0.10321668434075645, 'fraction_numerical': 0.014846235418875928, 'mean_word_length': 2.413751507840772, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '5661467', 'n_tokens_mistral': 859, 'n_tokens_neox': 809, 'n_words': 212}