-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pronunciation assessment sample code in csharp (WPF) (#184)
* Add pronunciation assessment sample code in csharp (WPF) * Add copyright comment
- Loading branch information
Showing
21 changed files
with
1,039 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Microsoft.Xaml.Behaviors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Application x:Class="SpeechScore.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:SpeechScore" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! --> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" /> | ||
<!-- Accent and AppTheme setting --> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace SpeechScore | ||
{ | ||
using System.Windows; | ||
|
||
/// <summary> | ||
/// App.xaml interactive logic | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<Controls:MetroWindow x:Class="SpeechScore.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" | ||
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" | ||
GlowBrush="{DynamicResource AccentColorBrush}" | ||
Title="English Pronunciation Score" TitleCharacterCasing="Normal" FontSize="20" Height="400" Width="600" Loaded="MetroWindow_Loaded" WindowStartupLocation="CenterScreen" WindowState="Maximized"> | ||
<Grid> | ||
<Grid x:Name="PronGrid"> | ||
<Label x:Name="RegionLbl" Content="Region:" HorizontalAlignment="Left" Margin="20,32,0,0" VerticalAlignment="Top"/> | ||
<ComboBox x:Name="Region" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="95,40,0,0" Height="24" Width="105"> | ||
<ComboBoxItem>WestUS</ComboBoxItem> | ||
<ComboBoxItem IsSelected="True">EastAsia</ComboBoxItem> | ||
<ComboBoxItem>CentralIndia</ComboBoxItem> | ||
</ComboBox> | ||
|
||
<Label x:Name="SubscriptionKeyLbl" Content="Subscription Key:" HorizontalAlignment="Left" Margin="200,32,0,0" VerticalAlignment="Top"/> | ||
<TextBox x:Name="SubscriptionKey" HorizontalAlignment="Left" Height="24" Margin="360,40,0,0" Text="" VerticalAlignment="Top" Width="220"/> | ||
|
||
<StackPanel Orientation="Horizontal" Height="60" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="198,82,198,0"> | ||
<Button ToolTip="TTS" x:Name="TTSBut" HorizontalAlignment="Left" Style="{DynamicResource MahApps.Metro.Styles.MetroCircleButtonStyle}" Height="48" Width="48" Margin="0,5,0,0" Click="TTSBut_Click"> | ||
<iconPacks:PackIconModern Kind="Sound3" Height="32" Width="32" /> | ||
</Button> | ||
|
||
<Button ToolTip="Record" x:Name="StartBut" Style="{DynamicResource MahApps.Metro.Styles.MetroCircleButtonStyle}" Margin="100,5,0,0" Width="48" Height="48" Click="Button_Start_Click"> | ||
<iconPacks:PackIconModern Kind="Microphone" Height="20" Width="20"/> | ||
</Button> | ||
<Button ToolTip="Stop" Visibility="Collapsed" x:Name="StopBut" Style="{DynamicResource MahApps.Metro.Styles.MetroCircleButtonStyle}" Width="48" Height="48" Margin="100,5,0,0" Click="Button_Stop_Click"> | ||
<iconPacks:PackIconModern Kind="ControlStop" Height="20" Width="20" /> | ||
</Button> | ||
|
||
</StackPanel> | ||
<RichTextBox IsReadOnly="False" x:Name="ReferenceText" FontSize="40" HorizontalAlignment="Left" Height="190" Margin="80,150,80,0" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto"> | ||
<FlowDocument TextAlignment="Center"> | ||
<Paragraph> | ||
<Run>Good Morning!</Run> | ||
</Paragraph> | ||
</FlowDocument> | ||
</RichTextBox> | ||
<Controls:ProgressRing x:Name="progressRing" IsActive="False" VerticalAlignment="Top" Margin="0,150,0,0"/> | ||
|
||
<WebBrowser x:Name="PronScoreWebBrowser" HorizontalAlignment="Left" Margin="20,360,20,100" VerticalAlignment="Top" /> | ||
</Grid> | ||
|
||
</Grid> | ||
</Controls:MetroWindow> |
Oops, something went wrong.