Nov.04

Opentx Automated SAPI5 Voice Generator

​Hey fellow OpenTX users!

I've been procrastinating whilst writing up my thesis, at the end of finishing up a rather long Matlab script I thought wouldn't it be great to be able to use Matlab to generate and save SAPI5 voice packs for my favorite TX, the FrSky Taranis.
Starting off with an Excel spreadsheet containing a list of the text to be read, the directory structure and the file name, this was imported into Matlab 2010 x32 (yep, it is the 32bit version, I have only been able to find a x32 version of the dll required for this script to work, I simply don't have enough time to procrastinate long enough to write my own x64 version). Then set up a few variables and a small looping script to take the text, file name and directory, read out the text in your favourite voice flavour then save the files into a new folder.

The script is as follows: rting off with an Excel spreadsheet containing a list of the text to be read, the directory structure and the file name, this was imported into Matlab 2010 x32 (yep, it is the 32bit version, I have only been able to find a x32 version of the dll required for this script to work, I simply don't have enough time to procrastinate long enough to write my own x64 version). Then set up a few variables and a small looping script to take the text, file name and directory, read out the text in your favourite voice flavour then save the files into a new folder.

The script is as follows:

rting off with an Excel spreadsheet containing a list of the text to be read, the directory structure and the file name, this was imported into Matlab 2010 x32 (yep, it is the 32bit version, I have only been able to find a x32 version of the dll required for this script to work, I simply don't have enough time to procrastinate long enough to write my own x64 version). Then set up a few variables and a small looping script to take the text, file name and directory, read out the text in your favourite voice flavour then save the files into a new folder.

The script is as follows:

Code:

% Set up the initial parameters
clear all;close all;
load('TaranisVoiceData.mat');
Fs   = 32000;
N     = 228;
R     = 2;
Voice = 3;
FileName = 2;
Directory = 1;
Speed = 0; %range goes from -5 to 5
Nbits = 16;
% Extract all words, file paths and file names
for R = 2:N
% the first one is a string
if R == 1
VoiceList{R-1,Voice} = cellstr(textdata(R,Voice)); % use this for cells that contain 'strings'
VoiceList{R-1,FileName} = cellstr(textdata(R,FileName)); 
VoiceList{R-1,Directory} = cellstr(textdata(R,Directory)); 
else
% the next 2 to 110 are numbers
if R >= 2
if R <= 110
VoiceList{R-1,Voice} = num2str(textdata{R,Voice}); % use this for cells that contain numbers
VoiceList{R-1,FileName} = num2str(textdata{R,FileName}); 
VoiceList{R-1,Directory} = num2str(textdata{R,Directory}); 
elseif R > 110
VoiceList{R-1,Voice} = num2str(textdata{R,Voice}); % use this for cells that contain numbers
VoiceList{R-1,FileName} = num2str(textdata{R,FileName}); 
VoiceList{R-1,Directory} = num2str(textdata{R,Directory}); 
end
end 
end
end
%% Now to convert the text into speech and save
Y=1;
for Y=1:N
if Y==227
break
end
VoiceTemp = VoiceList(Y,3);
w = tts(char(VoiceTemp),'VW Kate',Speed,Fs);
currentPath = pwd; % Get the current working directory
[~,~,~] = mkdir(strcat(currentPath,'\SOUNDS'),'EN'); % make a new directory to store the files in ../EN & ../EN/SYSTEM
[~,~,~] = mkdir(strcat(currentPath,'\SOUNDS\EN'),'SYSTEM'); % make a new directory to store the files in ../EN & ../EN/SYSTEM
currentPath = strcat(currentPath,'\',VoiceList{Y,Directory},'\',VoiceList{Y,FileName}); % get the full file path
SaveToHere = currentPath; % store full file path in temp variable
% Save the file
wavwrite(w,Fs,Nbits,currentPath);
Y %counter to monitor progress
end

The files are available here:

Thanks to Siyi Dend who wrote the initial TTS script used in this release.


One last thing, to get a list of all the voices that you have available on your computer system just open up Matlab, open the working directory where you have saved the files downloaded from the section above, then in the console type in:
tts('','List');

Matlab will print out a list of all available voices on your PC. You can see in the script file I have used the 'VW Kate' SAPI5 voice pack, if you remove the 'VW Kate' and make it like this:

w = tts(char(VoiceTemp),'',Speed,Fs);

the script will use the default terrible Microsoft Mike or Anna voice, which is rather deplorable, so jump online and Google free SAPI5 voices, there are plenty to be found. See the figure below for an example list.


So with all of that out of the way, I hope that this script may become of use to someone in the community.
Let me know if there are any bugs and I'll try to fix them when I get another opportunity to procrastinate =)
Cheers & happy flying,
L

Uncategorized

Oct.28

Adaptive-Multi-Reference Sub-band Least Means Squares Filter

Adaptive-Multi-Reference Sub-band Least Means Squares Filter

Full-text · Conference Paper · Nov 2014
Uncategorized

Dec.27

OrbTX the Natural controller for multirotor platforms

The OrbTX, an idea to adapt an older PC gaming technology for use with modern RC transmitters. To begin with the OrbTX is based on three modules, the SpaceOrb360 handheld serial gaming controller, an Arduino Pro Mini or Tiny32 microcontroller and an FrSky Taranis OpenSource RC transmitter. The idea began about four years ago during the development of my undergraduate research project: ducted fan quadrotor platform and control system.

SpaceOrb Stock Photo

SpaceTech IMC’s 6-DOF SpaceOrb 360 Controller

The unit is wired up to an Arduino ProMini microcontroller via a MAX232 RS232-TTL serial converter IC to ensure that the serial data is in the right voltage range (5Vdc rather than around ~>20Vdc).  The UC is used to convert the serial data output from the 360 to PPM with a little magic in the middle to handle the throttle positioning as all control channels from the 360 are center sprung, returning to a neutral position once force is removed. The UC is then connected to the Taranis TX via the trainer port, this should ensure that the TX can not only recieve control commands from the 360 but also allows for the use of the existing switches and potentiometers on the Taranis, allowing control of landing gear, lights, flight modes, grippers, sirens, taco droppers, etc…

IMG_20140805_111919IMG_20140805_11200020140809_115822

More to come once the thesis has been submitted =)

27/12/2015 Update
New Orbotron 9k SMD has arrived, time to put in some hard hours of coding and get this project heading in the right direction.

image

Uncategorized

Dec.27

Dual 3D Printer Hotend

So I’ve finally managed to find the time to upgrade the Hadron 3D Printer from using a single Budaschnozzle Hotend to dual bowden driven hotends using custom parts made by Ben Lear over at LearCNC. The twin head setup should provide the ability to print using two different materials, one being a dissovable media used as a support structure for the primary FFDM material. I intend on trying to use ABS and Taulman Bridge Nylon as the primary and either a PLA or PVA based secondary support material. Experimental results will follow in coming posts.

image

(I know the hot end mounting plate is curved in the picture, the image was taken while the parts were being fitted to ensure the tolerances and part sizing were correct, the final mounting will feature three 35mm bolts to rigidly fix the Mount to the X axis gantry)

I also recently purchased a 250gm wood based PLA from the local Jaycar Electronics store. I haven’t had the chance to try it out yet as the printer has been off line, but it’s an interesting material, made from an 80% wood filler and 20% PLA binder, the end results can be sanded and even stained and varnished. Even the woodgrain is replicated through the layers of the print itself. Great stuff, more results to follow soon.

25/12/2015 Update

As it turns out the two black printed supports were causing a small amount of bending to the hotend mounting plate. So to remedy this I’ve removed the whole blue anodised x-axis carriage and drilled and countersunk an array of mounting points. Three of these are used to rigidly fix the hotend fixture to the carriage using three 3x45mm hex head bolts running directly through the centre of the fixture to the aluminium plate. The black printed supports now removed. The whole carriage is far more rigid, and the hotend fixture no longer appears bent and remains dead flat =) I’ll run off a few points to see how well the system performs and post the results the next chance I get to get back to my house.

Uncategorized

Dec.06

CNC Touch Probe addition

Over the last day or so I’ve been working on adding a touch probe to my CNC router, this will hopefully allow the software to know exactly where the end of the tool actually is.
The touch pad is milled from a block of HDPE plastic to ensure electrical isolation from the bed surface, a milled pocket is centrally located in the block.

A 30mm x 30mm section of double sided PCB is mounted via four small cap head hex bolts each of which are spring loaded to allow for 5mm of Z travel just in case the system does not register a touch and starts driving the tool through the plate. It should be just enough time to hit the estop before damaging the tool, or driving it straight through the milling bed.

I’ll post a few pics from both the CAD model and the finished product when I get some time over the next few days.

 

Uncategorized