|
7 | 7 | xmlns:CommonControls="clr-namespace:TensorStack.WPF.Controls;assembly=TensorStack.WPF" |
8 | 8 | xmlns:PythonOptions="clr-namespace:TensorStack.Python.Common;assembly=TensorStack.Python" |
9 | 9 | xmlns:Extractors="clr-namespace:TensorStack.Extractors.Common;assembly=TensorStack.Extractors" |
| 10 | + xmlns:Whisper="clr-namespace:TensorStack.TextGeneration.Pipelines.Whisper;assembly=TensorStack.TextGeneration" |
| 11 | + xmlns:TextGeneration="clr-namespace:TensorStack.TextGeneration.Common;assembly=TensorStack.TextGeneration" |
10 | 12 | xmlns:Common="clr-namespace:Diffuse.Common" |
11 | 13 | ShutdownMode="OnMainWindowClose"> |
12 | 14 | <Application.Resources> |
|
178 | 180 | </ObjectDataProvider.MethodParameters> |
179 | 181 | </ObjectDataProvider> |
180 | 182 |
|
| 183 | + <ObjectDataProvider x:Key="TaskType" MethodName="GetValues" ObjectType="{x:Type System:Enum}"> |
| 184 | + <ObjectDataProvider.MethodParameters> |
| 185 | + <x:Type TypeName="Whisper:TaskType"/> |
| 186 | + </ObjectDataProvider.MethodParameters> |
| 187 | + </ObjectDataProvider> |
| 188 | + |
| 189 | + <ObjectDataProvider x:Key="LanguageType" MethodName="GetValues" ObjectType="{x:Type System:Enum}"> |
| 190 | + <ObjectDataProvider.MethodParameters> |
| 191 | + <x:Type TypeName="Whisper:LanguageType"/> |
| 192 | + </ObjectDataProvider.MethodParameters> |
| 193 | + </ObjectDataProvider> |
| 194 | + |
| 195 | + |
| 196 | + <ObjectDataProvider x:Key="EarlyStopping" MethodName="GetValues" ObjectType="{x:Type System:Enum}"> |
| 197 | + <ObjectDataProvider.MethodParameters> |
| 198 | + <x:Type TypeName="TextGeneration:EarlyStopping"/> |
| 199 | + </ObjectDataProvider.MethodParameters> |
| 200 | + </ObjectDataProvider> |
181 | 201 |
|
182 | 202 | <Style x:Key="ImageDropZoneStyle" TargetType="{x:Type Border}"> |
183 | 203 | <Setter Property="AllowDrop" Value="False"/> |
|
240 | 260 | </Style> |
241 | 261 |
|
242 | 262 |
|
| 263 | + <Style x:Key="AudioDropZoneStyle" TargetType="{x:Type Border}"> |
| 264 | + <Setter Property="AllowDrop" Value="False"/> |
| 265 | + <Setter Property="BorderBrush" Value="Transparent"/> |
| 266 | + <Setter Property="BorderThickness" Value="1"/> |
| 267 | + <Style.Triggers> |
| 268 | + <MultiDataTrigger> |
| 269 | + <MultiDataTrigger.Conditions> |
| 270 | + <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True" /> |
| 271 | + <Condition Binding="{Binding IsDragDrop, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value="True" /> |
| 272 | + <Condition Binding="{Binding DragDropType, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value="Audio" /> |
| 273 | + </MultiDataTrigger.Conditions> |
| 274 | + <MultiDataTrigger.Setters> |
| 275 | + <Setter Property="AllowDrop" Value="True"/> |
| 276 | + <Setter Property="BorderBrush" Value="{StaticResource AccentColour2}"/> |
| 277 | + </MultiDataTrigger.Setters> |
| 278 | + </MultiDataTrigger> |
| 279 | + </Style.Triggers> |
| 280 | + </Style> |
| 281 | + |
| 282 | + |
| 283 | + <Style x:Key="TextDropZoneStyle" TargetType="{x:Type Border}"> |
| 284 | + <Setter Property="AllowDrop" Value="False"/> |
| 285 | + <Setter Property="BorderBrush" Value="Transparent"/> |
| 286 | + <Setter Property="BorderThickness" Value="1"/> |
| 287 | + <Style.Triggers> |
| 288 | + <MultiDataTrigger> |
| 289 | + <MultiDataTrigger.Conditions> |
| 290 | + <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True" /> |
| 291 | + <Condition Binding="{Binding IsDragDrop, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value="True" /> |
| 292 | + <Condition Binding="{Binding DragDropType, RelativeSource={RelativeSource AncestorType=CommonControls:ViewControl}}" Value="Text" /> |
| 293 | + </MultiDataTrigger.Conditions> |
| 294 | + <MultiDataTrigger.Setters> |
| 295 | + <Setter Property="AllowDrop" Value="True"/> |
| 296 | + <Setter Property="BorderBrush" Value="{StaticResource AccentColour2}"/> |
| 297 | + </MultiDataTrigger.Setters> |
| 298 | + </MultiDataTrigger> |
| 299 | + </Style.Triggers> |
| 300 | + </Style> |
| 301 | + |
| 302 | + |
243 | 303 | <Style x:Key="ToggleButtonBasic" TargetType="{x:Type ToggleButton}"> |
244 | 304 | <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/> |
245 | 305 | <Setter Property="Background" Value="{StaticResource ComboBoxBackground}"/> |
|
308 | 368 | </Style> |
309 | 369 |
|
310 | 370 | <Style x:Key="MenuIconButton" TargetType="{x:Type CommonControls:IconButton}" BasedOn="{StaticResource {x:Type CommonControls:IconButton}}"> |
311 | | - <Setter Property="Width" Value="300"/> |
| 371 | + <Setter Property="Width" Value="250"/> |
312 | 372 | <Setter Property="Orientation" Value="Horizontal"/> |
313 | 373 | <Setter Property="Placement" Value="Bottom"/> |
314 | 374 | <Setter Property="FontSize" Value="14"/> |
|
822 | 882 | </DataTemplate> |
823 | 883 |
|
824 | 884 |
|
| 885 | + <DataTemplate DataType="{x:Type Common:AudioHistory}"> |
| 886 | + <DockPanel Margin="10,0,0,0"> |
| 887 | + <TextBlock DockPanel.Dock="Top" Text="{Binding MediaType, StringFormat={}Generated {0}}" FontSize="20"/> |
| 888 | + <StackPanel> |
| 889 | + <Separator Opacity=".7"/> |
| 890 | + <UniformGrid Columns="3" Margin="0,6,0,0"> |
| 891 | + <StackPanel> |
| 892 | + <TextBlock Text="Voice Style" Style="{StaticResource FieldTextBlockStyle}" /> |
| 893 | + <TextBlock> |
| 894 | + <Run Text="{Binding Options.VoiceStyle}" /> |
| 895 | + </TextBlock> |
| 896 | + </StackPanel> |
| 897 | + <StackPanel> |
| 898 | + <TextBlock Text="Speed" Style="{StaticResource FieldTextBlockStyle}" /> |
| 899 | + <TextBlock> |
| 900 | + <Run Text="{Binding Options.Speed}" /> |
| 901 | + <Run Text="x" /> |
| 902 | + </TextBlock> |
| 903 | + </StackPanel> |
| 904 | + <StackPanel> |
| 905 | + <TextBlock Text="Duration" Style="{StaticResource FieldTextBlockStyle}" /> |
| 906 | + <TextBlock> |
| 907 | + <Run Text="{Binding Duration, FallbackValue=00:00:00, StringFormat={}mm\\:ss\\.ff}" /> |
| 908 | + <Run Text="ms" /> |
| 909 | + </TextBlock> |
| 910 | + </StackPanel> |
| 911 | + <StackPanel> |
| 912 | + <TextBlock Text="Seed" Style="{StaticResource FieldTextBlockStyle}" /> |
| 913 | + <TextBlock> |
| 914 | + <Run Text="{Binding Options.Seed}" /> |
| 915 | + </TextBlock> |
| 916 | + </StackPanel> |
| 917 | + <StackPanel> |
| 918 | + <TextBlock Text="Steps" Style="{StaticResource FieldTextBlockStyle}" /> |
| 919 | + <TextBlock> |
| 920 | + <Run Text="{Binding Options.Steps}" /> |
| 921 | + </TextBlock> |
| 922 | + </StackPanel> |
| 923 | + <StackPanel> |
| 924 | + <TextBlock Text="Sample Rate" Style="{StaticResource FieldTextBlockStyle}" /> |
| 925 | + <TextBlock> |
| 926 | + <Run Text="{Binding SampleRate}" /> |
| 927 | + <Run Text="hz" /> |
| 928 | + </TextBlock> |
| 929 | + </StackPanel> |
| 930 | + </UniformGrid> |
| 931 | + |
| 932 | + <StackPanel Margin="0,6,0,0" > |
| 933 | + <TextBlock Text="Created" Style="{StaticResource FieldTextBlockStyle}" /> |
| 934 | + <TextBlock Text="{Binding Timestamp}" /> |
| 935 | + </StackPanel> |
| 936 | + <UniformGrid Columns="2" Margin="0,6,0,0"> |
| 937 | + <StackPanel> |
| 938 | + <TextBlock Text="{Binding MediaType, StringFormat={}{0} Path}" Style="{StaticResource FieldTextBlockStyle}" /> |
| 939 | + <CommonControls:HyperlinkControl Label="{Binding MediaPath, Converter={StaticResource FullPathToFileNameConverter}}" Link="{Binding MediaPath, Converter={StaticResource FullPathToFolderConverter}}" IsUnderlineEnabled="False" /> |
| 940 | + </StackPanel> |
| 941 | + <StackPanel> |
| 942 | + <TextBlock Text="Info Path" Style="{StaticResource FieldTextBlockStyle}" /> |
| 943 | + <CommonControls:HyperlinkControl Label="{Binding FilePath, Converter={StaticResource FullPathToFileNameConverter}}" Link="{Binding FilePath}" IsUnderlineEnabled="False" /> |
| 944 | + </StackPanel> |
| 945 | + </UniformGrid> |
| 946 | + </StackPanel> |
| 947 | + </DockPanel> |
| 948 | + </DataTemplate> |
| 949 | + |
| 950 | + |
| 951 | + <DataTemplate DataType="{x:Type Common:TextHistory}"> |
| 952 | + <DockPanel Margin="10,0,0,0"> |
| 953 | + <TextBlock DockPanel.Dock="Top" Text="{Binding MediaType, StringFormat={}Generated {0}}" FontSize="20"/> |
| 954 | + <StackPanel> |
| 955 | + <Separator Opacity=".7"/> |
| 956 | + <UniformGrid Columns="3" Margin="0,6,0,0"> |
| 957 | + <StackPanel> |
| 958 | + <TextBlock Text="Length" Style="{StaticResource FieldTextBlockStyle}" /> |
| 959 | + <TextBlock> |
| 960 | + <Run Text="{Binding InputLength}" /> |
| 961 | + </TextBlock> |
| 962 | + </StackPanel> |
| 963 | + |
| 964 | + </UniformGrid> |
825 | 965 |
|
| 966 | + <StackPanel Margin="0,6,0,0" > |
| 967 | + <TextBlock Text="Created" Style="{StaticResource FieldTextBlockStyle}" /> |
| 968 | + <TextBlock Text="{Binding Timestamp}" /> |
| 969 | + </StackPanel> |
| 970 | + <UniformGrid Columns="2" Margin="0,6,0,0"> |
| 971 | + <StackPanel> |
| 972 | + <TextBlock Text="{Binding MediaType, StringFormat={}{0} Path}" Style="{StaticResource FieldTextBlockStyle}" /> |
| 973 | + <CommonControls:HyperlinkControl Label="{Binding MediaPath, Converter={StaticResource FullPathToFileNameConverter}}" Link="{Binding MediaPath, Converter={StaticResource FullPathToFolderConverter}}" IsUnderlineEnabled="False" /> |
| 974 | + </StackPanel> |
| 975 | + <StackPanel> |
| 976 | + <TextBlock Text="Info Path" Style="{StaticResource FieldTextBlockStyle}" /> |
| 977 | + <CommonControls:HyperlinkControl Label="{Binding FilePath, Converter={StaticResource FullPathToFileNameConverter}}" Link="{Binding FilePath}" IsUnderlineEnabled="False" /> |
| 978 | + </StackPanel> |
| 979 | + </UniformGrid> |
| 980 | + </StackPanel> |
| 981 | + </DockPanel> |
| 982 | + </DataTemplate> |
826 | 983 |
|
827 | 984 |
|
828 | 985 | <Style x:Key="SettingsListBoxItem" TargetType="{x:Type ListBoxItem}"> |
|
0 commit comments