1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-12 19:10:19 +03:00

OpenTX Recorder added

This commit is contained in:
Kjell Kernen 2014-03-19 21:09:54 +01:00
parent 5677c5175c
commit 308136aec0
50 changed files with 3567 additions and 69 deletions

1
sound/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.suo

26
sound/OpenTXSound.sln Normal file
View file

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTXRecorder", "recorder\OpenTXRecorder.csproj", "{8143D08D-1861-42DD-A861-56B15DE42A69}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTXspeaker", "speaker\OpenTXspeaker.csproj", "{BB2C7ECA-B4B9-4957-B7D9-B0C7817CA148}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8143D08D-1861-42DD-A861-56B15DE42A69}.Debug|x86.ActiveCfg = Debug|x86
{8143D08D-1861-42DD-A861-56B15DE42A69}.Debug|x86.Build.0 = Debug|x86
{8143D08D-1861-42DD-A861-56B15DE42A69}.Release|x86.ActiveCfg = Release|x86
{8143D08D-1861-42DD-A861-56B15DE42A69}.Release|x86.Build.0 = Release|x86
{BB2C7ECA-B4B9-4957-B7D9-B0C7817CA148}.Debug|x86.ActiveCfg = Debug|x86
{BB2C7ECA-B4B9-4957-B7D9-B0C7817CA148}.Debug|x86.Build.0 = Debug|x86
{BB2C7ECA-B4B9-4957-B7D9-B0C7817CA148}.Release|x86.ActiveCfg = Release|x86
{BB2C7ECA-B4B9-4957-B7D9-B0C7817CA148}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

4
sound/recorder/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
/OpenTXrecorder.suo
/bin/*
/obj/*
*.csproj.user

8
sound/recorder/App.xaml Normal file
View file

@ -0,0 +1,8 @@
<Application x:Class="OpenTXrecorder.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

View file

@ -0,0 +1,32 @@
/* This file is part of OpenTX Recorder.
* OpenTX Recorder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OpenTX Recorder is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2014 Kjell Kernen */
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace OpenTXrecorder
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -0,0 +1,107 @@
<Window x:Class="OpenTXrecorder.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenTX Recorder"
Height="340"
MinWidth="840"
MaxWidth="840"
ResizeMode="CanResizeWithGrip" SizeToContent="Width" Icon="/OpenTXrecorder;component/icon.ico" MinHeight="340">
<Window.Resources>
<DataTemplate x:Key="image">
<Image x:Name="TheImage" />
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=fileExists}" Value="true">
<Setter TargetName="TheImage" Property="Source" Value="/OpenTXrecorder;component/play.png" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</Window.Resources>
<Grid VerticalAlignment="Stretch" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch">
<ListView Name="lvSentences"
SelectionMode="Single"
MouseDoubleClick="lvSentences_MouseDoubleClick"
VerticalAlignment="Stretch" >
<ListView.View>
<GridView>
<GridView.Columns>
<GridViewColumn Header="File Name" Width="90" DisplayMemberBinding="{Binding fileName}" />
<GridViewColumn Header="Description" Width="190" DisplayMemberBinding="{Binding description}" />
<GridViewColumn Header="Voice" Width="190" DisplayMemberBinding="{Binding voiceString}" />
<GridViewColumn Width="30" CellTemplate="{StaticResource image}" />
</GridView.Columns>
</GridView>
</ListView.View>
</ListView>
</Grid>
<StackPanel Grid.Row="0" Grid.Column="1">
<TextBlock Text="Settings" Margin="5,0,0,0" FontSize="18" />
<StackPanel Orientation="Vertical" HorizontalAlignment="Left" Margin="10,0,0,0">
<StackPanel Orientation="Horizontal">
<Label Content="Language" Width="75" />
<ComboBox Name="cbLanguages"
DisplayMemberPath="lName"
SelectedValuePath="sName"
SelectionChanged="cbLanguages_SelectionChanged"
Width="200" Height="23" />
</StackPanel>
</StackPanel>
<Separator Height="5" />
<TextBlock Text="Sentence" Margin="5,0,0,0" FontSize="18" />
<Grid Margin="10,0,0,0" DataContext="{Binding ElementName=lvSentences, Path=SelectedItem}" Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="75" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="File Name" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Margin="0,5,0,0" />
<TextBox Text="{Binding Path=fileName}" Grid.Row="0" Grid.Column="1" Margin=" 0,0,10,0" />
<TextBlock Text="Description" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="0" Margin="0,5,0,0" />
<TextBox Text="{Binding Path=description}" Grid.Row="1" Grid.Column="1" Margin=" 0,0,10,0"/>
<TextBlock Text="Sentence" Grid.Row="2" Grid.Column="0" Margin="0,5,0,0" />
<TextBox Text="{Binding Path=voiceString}" Grid.Row="2" Grid.Column="1" Margin="0,0,10,0"/>
</Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,5,0,0">
<Button Content="New Sentence" Width="120" Height="32" Name="buttonAddItem" Click="buttonAddItem_Click"/>
<Button Name="btnRecord" ToolTip="Start recording" Click="btnRecord_Click" Margin="20,0,0,0" >
<Image Height="32" Source="/OpenTXrecorder;component/record.png"/>
</Button>
<Button Name="btnStop" ToolTip="Stop recording" Click="btnStop_Click" Margin="5,0,0,0" >
<Image Height="32" Source="/OpenTXrecorder;component/stop.png" />
</Button>
<Button Name="btnPlay" ToolTip="Play Sentence" Click="btnPlay_Click" Margin="30,0,0,0" >
<Image Height="32" Source="/OpenTXrecorder;component/play.png" />
</Button>
</StackPanel>
<Separator Height="5" />
<Label Content="RECORDING" Name="lblRecording" HorizontalAlignment="Center" Foreground="Red" FontSize="24" FontWeight="Black" Visibility="Hidden" />
</StackPanel>
<Image Grid.Row="0" Grid.Column="1" Name="openTXLogo" Height="48" MouseLeftButtonDown="openTXLogo_MouseLeftButtonDown" HorizontalAlignment="Right" Cursor="Hand" Margin="0,0,0,0" Source="/OpenTXrecorder;component/recorder_logo.png" Stretch="Uniform" VerticalAlignment="Bottom" />
</Grid>
</Window>

View file

@ -0,0 +1,244 @@
/* This file is part of OpenTX Recorder.
* OpenTX Recorder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OpenTX Recorder is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2014 Kjell Kernen */
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Media;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
using System.Runtime.InteropServices;
namespace OpenTXrecorder
{
public partial class MainWindow : Window
{
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);
SentenceTables tables = new SentenceTables();
Languages languages = new Languages();
Language curLang;
Sentences sentences = new Sentences();
int added_files = 0;
bool isRecording = false;
public MainWindow()
{
SplashScreen splash = new SplashScreen("recorder_logo.png");
splash.Show(true);
Thread.Sleep(1500);
InitializeComponent();
lvSentences.ItemsSource = sentences;
cbLanguages.ItemsSource = languages;
languages.Add("English", "en");
languages.Add("Czech", "cz");
languages.Add("German", "de");
languages.Add("French", "fr");
languages.Add("Italian", "it");
languages.Add("Polish", "pl");
languages.Add("Portuguese", "pt");
languages.Add("Swedish", "se");
languages.Add("Slovak", "sk");
languages.Add("Spanish", "es");
curLang = languages[0];
cbLanguages.SelectedIndex = 0; // Note: Sets current langugage -> triggers loadlanguage()
}
private void loadLanguage()
{
string[] system_strings;
string[] other_strings;
try
{
system_strings = System.IO.File.ReadAllLines(@"SOUNDS\" + curLang.sName + @"\SYSTEM\system_sounds.txt");
other_strings = System.IO.File.ReadAllLines(@"SOUNDS\" + curLang.sName + @"\other_sounds.txt");
}
catch (IOException)
{
system_strings = tables.default_system_strings[tables.toInt(curLang.sName)];
other_strings = tables.default_other_strings[tables.toInt(curLang.sName)];
}
sentences.RemoveRange(0, sentences.Count);
foreach (string str in system_strings)
sentences.Add(str, @"SOUNDS\" + curLang.sName + @"\SYSTEM\");
sentences.Add(@";^ System Sounds ^;", "");
foreach (string str in other_strings)
sentences.Add(str, @"SOUNDS\" + curLang.sName + @"\");
lvSentences.Items.Refresh(); // Workaround - Two way binding is better
}
private void saveLanguage()
{
System.IO.Directory.CreateDirectory(@"SOUNDS\" + curLang.sName + @"\SYSTEM");
StreamWriter sw = File.CreateText(@"SOUNDS\" + curLang.sName + @"\SYSTEM\system_sounds.txt");
int i;
for (i = 0; sentences[i].fileName != ""; i++)
{
sw.WriteLine(sentences[i].toRaw());
}
sw.Close();
sw = File.CreateText(@"SOUNDS\" + curLang.sName + @"\other_sounds.txt");
for (i++; i < sentences.Count; i++)
{
sw.WriteLine(sentences[i].toRaw());
}
sw.Close();
}
private void cbLanguages_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
curLang = (Language)e.AddedItems[0];
loadLanguage();
}
private void lvSentences_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (this.lvSentences.SelectedItems.Count < 1) return;
Sentence sentence = (Sentence)this.lvSentences.SelectedItem;
if (sentence.fileExists)
{
try
{
SoundPlayer player = new SoundPlayer(sentence.fullPath());
player.Play();
}
catch (Exception) { }; // Catch and disregard all media exceptions
}
}
private void openTXLogo_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
AboutWindow aboutWindow = new AboutWindow();
aboutWindow.ShowDialog();
}
private void buttonAddItem_Click(object sender, RoutedEventArgs e)
{
added_files++;
sentences.Add(new Sentence("new_file_" + added_files.ToString() + ";New Description;New Voice Message", @"SOUNDS\" + curLang.sName + @"\"));
this.lvSentences.Items.Refresh();
this.lvSentences.SelectedIndex = this.lvSentences.Items.Count - 1;
this.lvSentences.ScrollIntoView(this.lvSentences.SelectedItem);
}
private void btnRecord_Click(object sender, RoutedEventArgs e)
{
if (this.lvSentences.SelectedItems.Count < 1) return;
if (isRecording)
btnStop_Click(sender, e);
else
{
saveLanguage();
isRecording = true;
lblRecording.Visibility = System.Windows.Visibility.Visible;
Sentence sentence = (Sentence)this.lvSentences.SelectedItem;
string path = sentence.fullPath();
Directory.CreateDirectory(Path.GetDirectoryName(path)); // Create directory if it doesn't exist
System.IO.File.WriteAllText(path, ""); // Creates and flushes a file if it does not exist
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0);
mciSendString("record recsound", "", 0, 0);
}
}
private void btnStop_Click(object sender, RoutedEventArgs e)
{
if (this.lvSentences.SelectedItems.Count < 1) return;
int index = this.lvSentences.SelectedIndex;
lblRecording.Visibility = System.Windows.Visibility.Hidden;
isRecording = false;
Sentence sentence = (Sentence)this.lvSentences.SelectedItem;
mciSendString("save recsound " + sentence.fullPath(), "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
loadLanguage(); // Called to refresh the sentence data of the current langugae
this.lvSentences.SelectedIndex = index;
}
private void btnPlay_Click(object sender, RoutedEventArgs e)
{
lblRecording.Visibility = System.Windows.Visibility.Hidden;
lvSentences_MouseDoubleClick(sender, null);
}
}
public class Language
{
public string lName { get; set; }
public string sName { get; set; }
}
public class Languages : List<Language>
{
public void Add(string longer, string shorter)
{
this.Add(new Language { lName = longer, sName = shorter });
}
}
public class Sentence
{
public string fileName { get; set; }
public string description { get; set; }
public string voiceString { get; set; }
public string path { get; set; }
public bool fileExists { get; set; }
public Sentence(string rawString, string dirPath)
{
string[] words = rawString.Split(';');
fileName = words[0].TrimStart(' ', '\"');
description = words[1];
voiceString = words[2].TrimEnd('\"', ',', ' ');
path = dirPath;
fileExists = File.Exists(fullPath());
}
public string fullPath()
{
return System.AppDomain.CurrentDomain.BaseDirectory + path + fileName + ".wav";
}
public string toRaw()
{
return "\"" + fileName + ";" + description + ";" + voiceString + "\",";
}
}
public class Sentences : List<Sentence>
{
public void Add(string rawString, string dirPath)
{
this.Add(new Sentence(rawString, dirPath));
}
}
}

View file

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8143D08D-1861-42DD-A861-56B15DE42A69}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenTXrecorder</RootNamespace>
<AssemblyName>OpenTXrecorder</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Speech" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="sentencetables.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="AboutWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Resource Include="recorder_logo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="GPLv3_Logo.png" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="play.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="record.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="stop.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,71 @@
/* This file is part of OpenTX Recorder.
* OpenTX Recorder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OpenTX Recorder is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2014 Kjell Kernen */
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenTX Recorder")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("OpenTX Team")]
[assembly: AssemblyProduct("OpenTX Recorder")]
[assembly: AssemblyCopyright("Copyright © Kjell Kernen 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1")]
[assembly: AssemblyFileVersion("0.1")]

View file

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenTXrecorder.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenTXrecorder.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View file

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenTXrecorder.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View file

@ -0,0 +1,49 @@
<Window x:Class="OpenTXrecorder.AboutWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenTX Recorder About Window" Height="350" Width="357" Icon="/OpenTXrecorder;component/icon.ico">
<Grid>
<StackPanel>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal" Width="240" HorizontalAlignment="Left">
<Label Content="Product:">
</Label>
<Label Content="Product Name" Name="lblProductName"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Label Content="Version:"/>
<Label Content="Version" Name="lblVersion"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Label Content="Company:" />
<Label Content="Company" Name="lblCompanyName"/>
</StackPanel>
<Label Content="Copyright" Name="lblCopyright" HorizontalAlignment="Left" />
</StackPanel>
<TextBlock>
<Hyperlink NavigateUri="http://www.open-tx.org/" RequestNavigate="Hyperlink_RequestNavigate">
<Image Stretch="Uniform" Height="90" Width="90" Cursor="Hand" Source="/OpenTXrecorder;component/icon.ico" />
</Hyperlink>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock Margin="5,5,5,0" TextWrapping="Wrap"
Text="This application is used to record OpenTX voice strings and generate audio files for use in the FrSky Taranis radio." />
<TextBlock Margin="5,10,5,0" TextWrapping="Wrap"
Text= "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version." />
<TextBlock Margin="5,5,5,0" TextWrapping="Wrap"
Text= "This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose." />
<StackPanel Orientation="Horizontal">
<TextBlock TextWrapping="Wrap" Margin="5,5,5,0" Width="230"
Text= "See the GNU General Public License for more details." />
<TextBlock>
<Hyperlink NavigateUri="http://www.gnu.org/licenses/" RequestNavigate="Hyperlink_RequestNavigate">
<Image Margin="0,5,0,0" Cursor="Hand" Source="/OpenTXrecorder;component/GPLv3_Logo.png" MinWidth="88" MaxWidth="88" />
</Hyperlink>
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</Window>

View file

@ -0,0 +1,62 @@
/* This file is part of OpenTX Recorder.
* OpenTX Recorder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* OpenTX Recorder is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2014 Kjell Kernen */
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Navigation;
namespace OpenTXrecorder
{
public partial class AboutWindow : Window
{
public AboutWindow()
{
InitializeComponent();
Assembly app = Assembly.GetExecutingAssembly();
AssemblyTitleAttribute title = (AssemblyTitleAttribute)app.GetCustomAttributes(typeof(AssemblyTitleAttribute), false)[0];
AssemblyProductAttribute product = (AssemblyProductAttribute)app.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0];
AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)app.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0];
AssemblyCompanyAttribute company = (AssemblyCompanyAttribute)app.GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0];
Version version = app.GetName().Version;
this.Title = String.Format("About {0}", title.Title);
this.lblProductName.Content = product.Product;
this.lblVersion.Content = String.Format("Version {0}", version.ToString());
this.lblCopyright.Content = copyright.Copyright.ToString();
this.lblCompanyName.Content = company.Company;
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
e.Handled = true;
}
}
}

View file

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Before After
Before After

BIN
sound/recorder/play.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
sound/recorder/record.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

File diff suppressed because it is too large Load diff

BIN
sound/recorder/stop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

3
sound/speaker/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/OpenTXspeaker.suo
/bin/*
/obj/*

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -2,10 +2,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenTX Speaker" Title="OpenTX Speaker"
Height="460" Height="514"
MinWidth="840" MinWidth="840"
MaxWidth="840" MaxWidth="840"
ResizeMode="CanResizeWithGrip" MinHeight="460" SizeToContent="Width"> ResizeMode="CanResizeWithGrip" MinHeight="514" SizeToContent="Width" Icon="/OpenTXspeaker;component/icon.ico">
<Grid VerticalAlignment="Stretch" > <Grid VerticalAlignment="Stretch" >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -71,7 +71,7 @@
<TextBox Text="{Binding Path=voiceString}" Grid.Row="2" Grid.Column="1" Margin="0,0,10,0"/> <TextBox Text="{Binding Path=voiceString}" Grid.Row="2" Grid.Column="1" Margin="0,0,10,0"/>
</Grid> </Grid>
<StackPanel Orientation="Horizontal" Margin="0,0,0,0"> <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock Text="Voice Rate" Width="70" Margin="10,10,0,0" /> <TextBlock Text="Rate" Width="70" Margin="10,10,0,0" />
<Slider Name="voiceRateSlider" <Slider Name="voiceRateSlider"
Value="0" Value="0"
Minimum="-5" Minimum="-5"
@ -82,6 +82,21 @@
Width="170" Width="170"
Margin="10,10,10,0"/> Margin="10,10,10,0"/>
<TextBlock Text="{Binding ElementName=voiceRateSlider, Path=Value}" Width="40" Margin="0,10,0,0"/> <TextBlock Text="{Binding ElementName=voiceRateSlider, Path=Value}" Width="40" Margin="0,10,0,0"/>
<TextBlock Text="Voice Rate" Width="70" Margin="10,10,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock Text="Volume" Width="70" Margin="10,10,0,0" />
<Slider Name="voiceVolumeSlider"
Value="50"
Minimum="0"
Maximum="100"
TickPlacement="BottomRight"
TickFrequency="10"
IsSnapToTickEnabled="False"
Width="170"
Margin="10,10,10,0"/>
<TextBlock Text="{Binding ElementName=voiceVolumeSlider, Path=Value}" Width="40" Margin="0,10,0,0"/>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
@ -91,7 +106,7 @@
<Separator Height="5" /> <Separator Height="5" />
<TextBlock Text="Voice Files" Margin="5,0,0,0" FontSize="18" /> <TextBlock Text="Voice Files" Margin="5,0,0,0" FontSize="18" />
<StackPanel Orientation="Horizontal" > <StackPanel Orientation="Horizontal" >
<TextBlock Text="Voice Rate" Width="70" Margin="10,0,0,0" /> <TextBlock Text="Rate" Width="70" Margin="10,0,0,0" />
<Slider Name="fileRateSlider" <Slider Name="fileRateSlider"
Value="0" Value="0"
Minimum="-5" Minimum="-5"
@ -103,18 +118,34 @@
Margin="10,0,10,0"/> Margin="10,0,10,0"/>
<TextBlock Text="{Binding ElementName=fileRateSlider, Path=Value}" Width="40" /> <TextBlock Text="{Binding ElementName=fileRateSlider, Path=Value}" Width="40" />
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<TextBlock Text="Volume" Width="70" Margin="10,10,0,0" />
<Slider Name="fileVolumeSlider"
Value="50"
Minimum="0"
Maximum="100"
TickPlacement="BottomRight"
TickFrequency="10"
IsSnapToTickEnabled="False"
Width="170"
Margin="10,10,10,0"/>
<TextBlock Text="{Binding ElementName=fileVolumeSlider, Path=Value}" Width="40" Margin="0,10,0,0"/>
</StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="Sample Rate" Width="70" Margin="10,10,0,0" /> <TextBlock Text="Sample Rate" Width="70" Margin="10,10,0,0" />
<RadioButton Content="8 KHz" Height="16" Name="rb8khz" Margin="10,10,0,0"/> <RadioButton Content="8 KHz" Height="16" Name="rb8khz" Margin="10,10,0,0"/>
<RadioButton Content="16 kHz" Height="16" Name="rb16khz" Margin="10,10,0,0" /> <RadioButton Content="16 kHz" Height="16" Name="rb16khz" IsChecked="True" Margin="10,10,0,0" />
<RadioButton Content="32 kHz" Height="16" Name="rb32khz" IsChecked="True" Margin="10,10,0,0"/> <RadioButton Content="32 kHz" Height="16" Name="rb32khz" Margin="10,10,0,0"/>
</StackPanel> </StackPanel>
<Button Content="Generate Voice Files" Name="buttonGenerate" Click="buttonSaveFiles_Click" Margin="10,10,10,0" /> <Button Content="Generate Voice Files" Name="buttonGenerate" Click="buttonSaveFiles_Click" Margin="10,10,10,0" />
<Separator Height="5" /> <Separator Height="5" />
<StackPanel Width="Auto" Orientation="Horizontal">
<TextBlock FontSize="18" VerticalAlignment="Center" MouseLeftButtonDown="InstallVoices_MouseLeftButtonDown" Cursor="Hand" HorizontalAlignment="Center" Margin="20,5,20,0" TextWrapping="Wrap" Height="48" Width="59" IsHyphenationEnabled="True">Install Voices</TextBlock> </StackPanel>
<Image Name="openTXLogo" Height="48" Source="/OpenTXspeak;component/speaker_logo.png" MouseLeftButtonDown="openTXLogo_MouseLeftButtonDown" HorizontalAlignment="Right" Cursor="Hand" Margin="0,5,10,0"/> <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right">
</StackPanel> <TextBlock FontSize="18" VerticalAlignment="Center" MouseLeftButtonDown="InstallVoices_MouseLeftButtonDown" Cursor="Hand" HorizontalAlignment="Center" Margin="20,0,20,0" TextWrapping="Wrap" Height="48" Width="59" IsHyphenationEnabled="True">Install Voices</TextBlock>
<Image Name="openTXLogo" Height="48" MouseLeftButtonDown="openTXLogo_MouseLeftButtonDown" HorizontalAlignment="Right" Cursor="Hand" Source="/OpenTXspeaker;component/speaker_logo.png" />
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </Window>

View file

@ -110,12 +110,13 @@ namespace OpenTXspeak
private void lvSentences_MouseDoubleClick(object sender, MouseButtonEventArgs e) private void lvSentences_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{ {
synth.SetOutputToDefaultAudioDevice();
synth.Rate = (int)this.voiceRateSlider.Value;
if (this.lvSentences.SelectedItems.Count < 1) if (this.lvSentences.SelectedItems.Count < 1)
return; return;
synth.SetOutputToDefaultAudioDevice();
synth.Rate = (int)this.voiceRateSlider.Value;
synth.Volume = (int)this.voiceVolumeSlider.Value;
Sentence sentence = (Sentence)this.lvSentences.SelectedItem; Sentence sentence = (Sentence)this.lvSentences.SelectedItem;
synth.SelectVoice(cbVoices.Text); synth.SelectVoice(cbVoices.Text);
try { synth.Speak(sentence.voiceString); } try { synth.Speak(sentence.voiceString); }
@ -153,7 +154,9 @@ namespace OpenTXspeak
Cursor oldCursor = this.Cursor; Cursor oldCursor = this.Cursor;
this.Cursor = Cursors.Wait; this.Cursor = Cursors.Wait;
synth.SelectVoice(cbVoices.Text);
synth.Rate = (int)this.fileRateSlider.Value; synth.Rate = (int)this.fileRateSlider.Value;
synth.Volume = (int)this.fileVolumeSlider.Value;
int sampleRate = 32000; int sampleRate = 32000;
if ((bool)this.rb16khz.IsChecked) if ((bool)this.rb16khz.IsChecked)

View file

@ -5,16 +5,31 @@
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8143D08D-1861-42DD-A861-56B15DE42A69}</ProjectGuid> <ProjectGuid>{BB2C7ECA-B4B9-4957-B7D9-B0C7817CA148}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenTXspeak</RootNamespace> <RootNamespace>OpenTXspeaker</RootNamespace>
<AssemblyName>OpenTXspeak</AssemblyName> <AssemblyName>OpenTXspeaker</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile> <TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -110,18 +125,38 @@
</None> </None>
<AppDesigner Include="Properties\" /> <AppDesigner Include="Properties\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="icon.ico" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="eSpeak.png" /> <Resource Include="eSpeak.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="icon.ico" />
<Resource Include="speaker_logo.png" /> <Resource Include="speaker_logo.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="GPLv3_Logo.png" /> <Resource Include="GPLv3_Logo.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010 # Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTXspeak", "OpenTXspeak.csproj", "{8143D08D-1861-42DD-A861-56B15DE42A69}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTXspeaker", "OpenTXspeaker.csproj", "{8143D08D-1861-42DD-A861-56B15DE42A69}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View file

@ -67,5 +67,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2")] [assembly: AssemblyVersion("1.3")]
[assembly: AssemblyFileVersion("1.2")] [assembly: AssemblyFileVersion("1.3")]

View file

@ -8,10 +8,10 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace OpenTXspeak.Properties namespace OpenTXspeaker.Properties {
{ using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
@ -22,48 +22,40 @@ namespace OpenTXspeak.Properties
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources internal class Resources {
{
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() internal Resources() {
{
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager internal static global::System.Resources.ResourceManager ResourceManager {
{ get {
get if (object.ReferenceEquals(resourceMan, null)) {
{ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenTXspeaker.Properties.Resources", typeof(Resources).Assembly);
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenTXspeak.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
} }
} }
/// <summary> /// <summary>
/// Overrides the current thread's CurrentUICulture property for all /// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture internal static global::System.Globalization.CultureInfo Culture {
{ get {
get
{
return resourceCulture; return resourceCulture;
} }
set set {
{
resourceCulture = value; resourceCulture = value;
} }
} }

View file

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -8,21 +8,17 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace OpenTXspeak.Properties namespace OpenTXspeaker.Properties {
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default public static Settings Default {
{ get {
get
{
return defaultInstance; return defaultInstance;
} }
} }

View file

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View file

@ -1,7 +1,7 @@
<Window x:Class="OpenTXspeak.AboutWindow" <Window x:Class="OpenTXspeak.AboutWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenTX About Window" Height="370" Width="357" Icon="/OpenTXspeak;component/icon.ico"> Title="OpenTX About Window" Height="350" Width="357" Icon="/OpenTXspeaker;component/icon.ico">
<Grid> <Grid>
<StackPanel> <StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
@ -23,7 +23,7 @@
</StackPanel> </StackPanel>
<TextBlock> <TextBlock>
<Hyperlink NavigateUri="http://www.open-tx.org/" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="http://www.open-tx.org/" RequestNavigate="Hyperlink_RequestNavigate">
<Image Source="/OpenTXspeak;component/icon.ico" Stretch="Uniform" Height="90" Width="90" Cursor="Hand" /> <Image Stretch="Uniform" Height="90" Width="90" Cursor="Hand" Source="/OpenTXspeaker;component/icon.ico" />
</Hyperlink> </Hyperlink>
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
@ -35,11 +35,11 @@
<TextBlock Margin="5,5,5,0" TextWrapping="Wrap" <TextBlock Margin="5,5,5,0" TextWrapping="Wrap"
Text= "This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose." /> Text= "This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose." />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock TextWrapping="Wrap" Margin="5,5,5,0" Width="175" <TextBlock TextWrapping="Wrap" Margin="5,5,5,0" Width="230"
Text= "See the GNU General Public License for more details." /> Text= "See the GNU General Public License for more details." />
<TextBlock> <TextBlock>
<Hyperlink NavigateUri="http://www.gnu.org/licenses/" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="http://www.gnu.org/licenses/" RequestNavigate="Hyperlink_RequestNavigate">
<Image Height="60" Width="149" Source="/OpenTXspeak;component/GPLv3_Logo.png" Margin="0,5,0,0" Cursor="Hand" /> <Image Width="88" Margin="0,5,0,0" Cursor="Hand" Source="/OpenTXspeaker;component/GPLv3_Logo.png" />
</Hyperlink> </Hyperlink>
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

BIN
sound/speaker/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -1,7 +1,7 @@
<Window x:Class="OpenTXspeak.InstallVoicesWindow" <Window x:Class="OpenTXspeak.InstallVoicesWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Install Additional Voices" Height="269" Width="504"> Title="Install Additional Voices" Height="269" Width="504" Icon="/OpenTXspeaker;component/icon.ico">
<Grid> <Grid>
<StackPanel Orientation="Vertical" > <StackPanel Orientation="Vertical" >
<TextBlock Margin="5,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" <TextBlock Margin="5,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap"
@ -15,7 +15,7 @@
Text="The author of this application used the free eSpeak voices to test voice generation. Many languages are supported. Click the image on the right to go to eSpeaks project page. There you can find out if your language is supported and download the voice package." /> Text="The author of this application used the free eSpeak voices to test voice generation. Many languages are supported. Click the image on the right to go to eSpeaks project page. There you can find out if your language is supported and download the voice package." />
<TextBlock> <TextBlock>
<Hyperlink NavigateUri="http://espeak.sourceforge.net/" RequestNavigate="Hyperlink_RequestNavigate"> <Hyperlink NavigateUri="http://espeak.sourceforge.net/" RequestNavigate="Hyperlink_RequestNavigate">
<Image Stretch="None" Source="/OpenTXspeak;component/eSpeak.png" Cursor="Hand" /> <Image Stretch="None" Cursor="Hand" Source="/OpenTXspeaker;component/eSpeak.png" />
</Hyperlink> </Hyperlink>
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

3
speaker/.gitignore vendored
View file

@ -1,3 +0,0 @@
/OpenTXspeak.suo
/bin/*
/obj/*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB