<commit_before>﻿using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;

using jcFUS.PCL.Transports;

namespace jcFUS.UWP.ViewModels {
    public class MainPageModel : INotifyPropertyChanged {
        private ObservableCollection<ChatLogItem> _chatlog;
        
        public ObservableCollection<ChatLogItem> ChatLog {
            get { return _chatlog; }
            set { _chatlog = value; OnPropertyChanged(); }
        }

        public MainPageModel() {
            ChatLog = new ObservableCollection<ChatLogItem>();
        }

        private string _chatEntry;

        public string ChatEntry {
            get { return _chatEntry; }
            set { _chatEntry = value; OnPropertyChanged(); }
        }

        public void SubmitChat() {
            ChatLog.Add(new ChatLogItem {
                Entry = ChatEntry,
                Timestamp = DateTime.Now,
                Username = "Jarred"
            });

            ChatEntry = string.Empty;
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}<commit_msg>Added Person Support in the VM<commit_after>﻿using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Windows.Media;
using Windows.Media.Audio;
using Windows.Media.Capture;
using Windows.Media.MediaProperties;
using Windows.Media.Render;
using jcFUS.PCL.Transports;

namespace jcFUS.UWP.ViewModels {
    public class MainPageModel : INotifyPropertyChanged {
        private ObservableCollection<ChatLogItem> _chatlog;
        
        public ObservableCollection<ChatLogItem> ChatLog {
            get { return _chatlog; }
            set { _chatlog = value; OnPropertyChanged(); }
        }

        private ObservableCollection<PersonItem> _connectedPeople;

        public ObservableCollection<PersonItem> ConnectedPeople {
            get { return _connectedPeople; }
            set { _connectedPeople = value; OnPropertyChanged(); }
        }  

        public MainPageModel() {
            ChatLog = new ObservableCollection<ChatLogItem>();

            ConnectedPeople = new ObservableCollection<PersonItem>();

            ConnectedPeople.Add(new PersonItem {
                Color = "Green",
                GUID = Guid.NewGuid(),
                Name = "Jarred"
            });
        }

        private string _chatEntry;

        public string ChatEntry {
            get { return _chatEntry; }
            set { _chatEntry = value; OnPropertyChanged(); }
        }

        public void SubmitChat() {
            ChatLog.Add(new ChatLogItem {
                Entry = ChatEntry,
                Timestamp = DateTime.Now,
                Username = "Jarred"
            });

            ChatEntry = string.Empty;
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        public async void EnableMicrophone()
        {
            AudioGraphSettings settings = new AudioGraphSettings(AudioRenderCategory.Communications);
        
            settings.DesiredRenderDeviceAudioProcessing = Windows.Media.AudioProcessing.Default;
            settings.QuantumSizeSelectionMode = QuantumSizeSelectionMode.LowestLatency;


            var result = await AudioGraph.CreateAsync(settings);

            var audioGraph = result.Graph;

            await audioGraph.CreateDeviceInputNodeAsync(MediaCategory.Communications,
                AudioEncodingProperties.CreateMp3(44100, 2, 128));

            frameOutputNode = audioGraph.CreateFrameOutputNode();

            audioGraph.QuantumProcessed += AudioGraphy_QuantumProcessed;

            audioGraph.Start();
           
        }

        private AudioFrameOutputNode frameOutputNode;

        private void AudioGraphy_QuantumProcessed(AudioGraph sender, object args) {
            AudioFrame frame = frameOutputNode.GetFrame();
        }
    }
}
{'fraction_non_alphanumeric': 0.07348168752897542, 'fraction_numerical': 0.0023180343069077423, 'mean_word_length': 2.332046332046332, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '113797', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1014, 'n_words': 228}