├── PiperUI
├── wpfui-icon-256.ico
├── Assets
│ ├── wpfui-icon-1024.png
│ ├── wpfui-icon-128.png
│ └── wpfui-icon-256.png
├── Usings.cs
├── Resources
│ └── Translations.cs
├── Models
│ ├── DataColor.cs
│ └── AppConfig.cs
├── App.xaml
├── Views
│ ├── Pages
│ │ ├── SettingsPage.xaml.cs
│ │ ├── SettingsPage.xaml
│ │ ├── DashboardPage.xaml
│ │ └── DashboardPage.xaml.cs
│ └── Windows
│ │ ├── MainWindow.xaml.cs
│ │ └── MainWindow.xaml
├── AssemblyInfo.cs
├── PiperUI.csproj
├── Helpers
│ └── EnumToBooleanConverter.cs
├── ViewModels
│ ├── Windows
│ │ └── MainWindowViewModel.cs
│ └── Pages
│ │ ├── SettingsViewModel.cs
│ │ └── DashboardViewModel.cs
├── Services
│ └── ApplicationHostService.cs
├── app.manifest
└── App.xaml.cs
├── README.md
├── PiperUI.sln
├── .gitattributes
└── .gitignore
/PiperUI/wpfui-icon-256.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/K-Jadeja/PiperUI/master/PiperUI/wpfui-icon-256.ico
--------------------------------------------------------------------------------
/PiperUI/Assets/wpfui-icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/K-Jadeja/PiperUI/master/PiperUI/Assets/wpfui-icon-1024.png
--------------------------------------------------------------------------------
/PiperUI/Assets/wpfui-icon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/K-Jadeja/PiperUI/master/PiperUI/Assets/wpfui-icon-128.png
--------------------------------------------------------------------------------
/PiperUI/Assets/wpfui-icon-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/K-Jadeja/PiperUI/master/PiperUI/Assets/wpfui-icon-256.png
--------------------------------------------------------------------------------
/PiperUI/Usings.cs:
--------------------------------------------------------------------------------
1 | global using CommunityToolkit.Mvvm.ComponentModel;
2 | global using CommunityToolkit.Mvvm.Input;
3 | global using System;
4 | global using System.Windows;
5 | global using Wpf.Ui.Contracts;
6 | global using Wpf.Ui.Services;
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PiperUI
2 |
3 | A user interface for creating voices with the Piper TTS.
4 | Uses the [Piper TTS](https://github.com/rhasspy/piper) for the text to speech, and [WPF UI](https://github.com/lepoco/wpfui) for the app theme / layout.
5 |
6 | 
7 |
8 |
--------------------------------------------------------------------------------
/PiperUI/Resources/Translations.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | namespace PiperUI.Resources
7 | {
8 | public partial class Translations
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/PiperUI/Models/DataColor.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | using System.Windows.Media;
7 |
8 | namespace PiperUI.Models
9 | {
10 | public struct DataColor
11 | {
12 | public Brush Color { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/PiperUI/Models/AppConfig.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | namespace PiperUI.Models
7 | {
8 | public class AppConfig
9 | {
10 | public string ConfigurationsFolder { get; set; }
11 |
12 | public string AppPropertiesFileName { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/PiperUI/App.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/PiperUI/Views/Pages/SettingsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | using PiperUI.ViewModels.Pages;
7 | using Wpf.Ui.Controls;
8 |
9 | namespace PiperUI.Views.Pages
10 | {
11 | public partial class SettingsPage : INavigableView
12 | {
13 | public SettingsViewModel ViewModel { get; }
14 |
15 | public SettingsPage(SettingsViewModel viewModel)
16 | {
17 | ViewModel = viewModel;
18 | DataContext = this;
19 |
20 | InitializeComponent();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/PiperUI/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | using System.Windows;
7 |
8 | [assembly: ThemeInfo(
9 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
10 | //(used if a resource is not found in the page,
11 | // or application resource dictionaries)
12 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
13 | //(used if a resource is not found in the page,
14 | // app, or any theme specific resource dictionaries)
15 | )]
16 |
--------------------------------------------------------------------------------
/PiperUI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.7.34221.43
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PiperUI", "PiperUI\PiperUI.csproj", "{75A786A0-156E-4CF9-8A4C-2375161CF630}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {75A786A0-156E-4CF9-8A4C-2375161CF630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {75A786A0-156E-4CF9-8A4C-2375161CF630}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {75A786A0-156E-4CF9-8A4C-2375161CF630}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {75A786A0-156E-4CF9-8A4C-2375161CF630}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {F4CB03C2-A521-4727-A607-0D3A27BAB6A5}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/PiperUI/Views/Windows/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | using PiperUI.ViewModels.Windows;
7 | using Wpf.Ui.Controls;
8 |
9 | namespace PiperUI.Views.Windows
10 | {
11 | public partial class MainWindow
12 | {
13 | public MainWindowViewModel ViewModel { get; }
14 |
15 | public MainWindow(
16 | MainWindowViewModel viewModel,
17 | INavigationService navigationService,
18 | IServiceProvider serviceProvider,
19 | ISnackbarService snackbarService,
20 | IContentDialogService contentDialogService
21 | )
22 | {
23 | Wpf.Ui.Appearance.Watcher.Watch(this);
24 |
25 | ViewModel = viewModel;
26 | DataContext = this;
27 |
28 | InitializeComponent();
29 |
30 | navigationService.SetNavigationControl(NavigationView);
31 | snackbarService.SetSnackbarPresenter(SnackbarPresenter);
32 | contentDialogService.SetContentPresenter(RootContentDialog);
33 |
34 | NavigationView.SetServiceProvider(serviceProvider);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/PiperUI/PiperUI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net7.0-windows
6 | app.manifest
7 | wpfui-icon-256.ico
8 | enable
9 | enable
10 | true
11 | wpfui-icon-128.png
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | True
38 | \
39 |
40 |
41 | Always
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/PiperUI/Helpers/EnumToBooleanConverter.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | namespace PiperUI.Helpers
10 | {
11 | internal class EnumToBooleanConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | if (parameter is not String enumString)
16 | {
17 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName");
18 | }
19 |
20 | if (!Enum.IsDefined(typeof(Wpf.Ui.Appearance.ThemeType), value))
21 | {
22 | throw new ArgumentException("ExceptionEnumToBooleanConverterValueMustBeAnEnum");
23 | }
24 |
25 | var enumValue = Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString);
26 |
27 | return enumValue.Equals(value);
28 | }
29 |
30 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
31 | {
32 | if (parameter is not String enumString)
33 | {
34 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName");
35 | }
36 |
37 | return Enum.Parse(typeof(Wpf.Ui.Appearance.ThemeType), enumString);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/PiperUI/ViewModels/Windows/MainWindowViewModel.cs:
--------------------------------------------------------------------------------
1 | // This Source Code Form is subject to the terms of the MIT License.
2 | // If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3 | // Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4 | // All Rights Reserved.
5 |
6 | using System.Collections.ObjectModel;
7 | using Wpf.Ui.Common;
8 | using Wpf.Ui.Controls;
9 |
10 | namespace PiperUI.ViewModels.Windows
11 | {
12 | public partial class MainWindowViewModel : ObservableObject
13 | {
14 | [ObservableProperty]
15 | private string _applicationTitle = "Piper";
16 |
17 | [ObservableProperty]
18 | private ObservableCollection