-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
157 lines (157 loc) · 5.4 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<Window x:Class="audio_powered_gpt.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mdxam="clr-namespace:MdXaml;assembly=MdXaml"
xmlns:local="clr-namespace:audio_powered_gpt"
mc:Ignorable="d"
Title="Audio Powered GPT" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height=".1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height=".1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height=".1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height=".1*"/>
<RowDefinition Height="*"/>
<RowDefinition Height=".1*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height=".1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".1*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width=".1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width=".1*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width=".1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width=".1*"/>
</Grid.ColumnDefinitions>
<Menu Grid.ColumnSpan="9">
<MenuItem Header="Configs">
<MenuItem
Header="Load"
Click="ConfigsLoad">
<MenuItem.Icon>
<Image Source="MenuIcons/load.png"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem
Header="Save"
Click="ConfigsSave">
<MenuItem.Icon>
<Image Source="MenuIcons/save.png"/>
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="About">
<MenuItem
Header="Version"
Click="AboutVersion">
<MenuItem.Icon>
<Image Source="MenuIcons/version.png"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem
Header="Source"
Click="AboutSource">
<MenuItem.Icon>
<Image Source="MenuIcons/source.png"/>
</MenuItem.Icon>
</MenuItem>
</MenuItem>
</Menu>
<TextBlock
Grid.Row="2"
Grid.Column="1"
Text="STT Key "/>
<PasswordBox
x:Name="SpeechKey"
Grid.Row="2"
Grid.Column="3"/>
<TextBlock
Grid.Row="2"
Grid.Column="5"
Text="STT Region "/>
<TextBox
x:Name="SpeechRegion"
Grid.Row="2"
Grid.Column="7"/>
<TextBlock
Grid.Row="4"
Grid.Column="1"
Text="AOAI Key "/>
<PasswordBox
x:Name="GptKey"
Grid.Row="4"
Grid.Column="3"/>
<TextBlock
Grid.Row="4"
Grid.Column="5"
Text="AOAI Model "/>
<TextBox
x:Name="GptModel"
Grid.Row="4"
Grid.Column="7"/>
<TextBlock
Grid.Row="6"
Grid.Column="1"
Text="AOAI Endpoint "/>
<TextBox
x:Name="GptEndpoint"
Grid.Row="6"
Grid.Column="3"/>
<ComboBox
x:Name="Mode"
Grid.Row="6"
Grid.Column="5">
<ComboBoxItem>Translate to Chinese</ComboBoxItem>
<ComboBoxItem>Interactive Speech</ComboBoxItem>
<ComboBoxItem IsSelected="True">Interactive Text</ComboBoxItem>
</ComboBox>
<Button
x:Name="StartStopBtn"
Grid.Row="6"
Grid.Column="7"
Content="Start/Stop"
IsEnabled="True"
Click="StartStop"/>
<TextBox
x:Name="PromotConsole"
Grid.Row="8"
Grid.Column="1"
Grid.ColumnSpan="7"
TextWrapping="Wrap"
AcceptsReturn="True"
VerticalScrollBarVisibility="Visible"/>
<TextBox
x:Name="ResponseConsole"
Grid.Row="10"
Grid.Column="1"
Grid.ColumnSpan="7"
IsReadOnly="True"
TextWrapping="Wrap"
AcceptsReturn="True"
VerticalScrollBarVisibility="Visible"/>
<mdxam:MarkdownScrollViewer
x:Name="ResponseMdConsole"
Grid.Row="10"
Grid.Column="1"
Grid.ColumnSpan="7"/>
<Button
x:Name="TextMarkdownBtn"
Grid.Row="11"
Grid.Column="1"
Grid.ColumnSpan="7"
Content="Text/Markdown"
IsEnabled="True"
Click="TextMarkdown"/>
</Grid>
</Window>