Talkie speech library

Status
Not open for further replies.
That was ported back some time by PJRC - not sure what came of the .end() if it was there when it was forked - I don't see an end() or any effort to stop the timers after they are started - or deal with the pin - other than setting PWM pins to output as needed on initial setup.

When I added the queue of multiple objects to run without blocking - at the end of the list I just fed it a quiet sound - but nothing disabled.

On T_3.2 [ A14 ] and other Teensy's with a DAC the sound may be better on the DAC pin.

Is not having the .end() causing trouble? It would take some effort - even if small - to shut the Talkie down to initial state of "setup=0" - no _isr() and interrupts and detecting the pin in use and setting it to INPUT.
 
I now have the Talkie working nicely on the Teensy 3.2 on pin 5. However, after a voice.say command, how do I get that pin back into a "normal" or inactive state?
Using the original Talkie library, I was able to send a voice.end(); command and gave that pin a high impedance by making that pin an INPUT.

I would tend to agree with @defragster. In going through the various commits for the Talkie library there doesn't seem be voice.end() command available even in the original commit of the library so I am not sure what library you are referring to.
 
Going back to the going-digital/Talkie fork source - not updated in 8 yrs - except a minor .H update 6 yrs back.

That lib has these in .H as public:
Code:
class Talkie
{
	public:
		void say(uint8_t* address);
		uint8_t* ptrAddr;
		uint8_t ptrBit;

Another forum user presented that library - and Paul did a Teensy extension that worked effectively so others were not looked at.

Would be interesting if other versions have usable sound extensions.
 
I would tend to agree with @defragster. In going through the various commits for the Talkie library there doesn't seem be voice.end() command available even in the original commit of the library so I am not sure what library you are referring to.

I'm trying to switch from 328p to teensy hardware for my APRS tracker with speech. In short, the tracker provides spoken information on position and altitude using the Talkie library. In addition, an APRS message is constructed with the help of a mx614tn modem chip. Both audio message are sent consecutively to the audio input of a transmitter.

Unfortunately, the 62.5Khz block wave of the Talkie signal frustrates the APRS message which comes later. Previously, I was able to stop the Talkie block wave in the Github/idhanu/Talkie version using the voice.end(); command. Subsequently, I switched the talkie audio pin to INPUT, to give the pin a high Impedance.

A method for killing the block wave after the Talkie message is therefore what I need.
 
That code github.com/idhanu/Talkie gives credit to the going-digital/Talkie fork by Peter made by PJRC - so the included sound set is the same.

It does show the added public interfaces that extended that library after it was forked - but about the same age of 8 years old.

Makes sense that stopping the _isr()'s between use might make a real diff with affecting some other things.

It could be done - adding .end() to undo .begin … actually done in the .sayQ() code [where say() calls sayQ()]. Set it to auto begin again on the next say() or sayQ().

The idhanu code has this for end() that just clears the AVR specific timers and startup:
Code:
void Talkie::end() {
	// Restore old timer register values
	TCCR2A = R_TCCR2A ;
	TCCR2B = R_TCCR2B; 
	TIMSK2 = R_TIMSK2; 
	TCCR1A = R_TCCR1A; 
	TCCR1B = R_TCCR1B; 
	TCNT1 = R_TCNT1; 
	OCR1A = R_OCR1A; 
	TIMSK1 = R_TIMSK1; 
	LIMITING_REG = R_LIMITING_REG;
}
 
That code github.com/idhanu/Talkie gives credit to the going-digital/Talkie fork by Peter made by PJRC - so the included sound set is the same.

It does show the added public interfaces that extended that library after it was forked - but about the same age of 8 years old.

Makes sense that stopping the _isr()'s between use might make a real diff with affecting some other things.

It could be done - adding .end() to undo .begin … actually done in the .sayQ() code [where say() calls sayQ()]. Set it to auto begin again on the next say() or sayQ().

The idhanu code has this for end() that just clears the AVR specific timers and startup:
Code:
void Talkie::end() {
	// Restore old timer register values
	TCCR2A = R_TCCR2A ;
	TCCR2B = R_TCCR2B; 
	TIMSK2 = R_TIMSK2; 
	TCCR1A = R_TCCR1A; 
	TCCR1B = R_TCCR1B; 
	TCNT1 = R_TCNT1; 
	OCR1A = R_OCR1A; 
	TIMSK1 = R_TIMSK1; 
	LIMITING_REG = R_LIMITING_REG;
}

Thanks for the suggestion. Will try to implement this solution into the current Talkie library. If it doesn't work out, I will try to remove the 62.5khz by using a low-pass audio filter.
 
Thanks for the suggestion. Will try to implement this solution into the current Talkie library. If it doesn't work out, I will try to remove the 62.5khz by using a low-pass audio filter.

Opps - that wasn't a suggestion to try - it won't work on ARM Teensy at all. That is the AVR code - that was SIMPLE to add on the base Talkie.

There are a couple more moving pieces where the Teensy version would conditionally do that for AVR - or in the ARM case stop the timer and clean up a few more items for safe restart.
 
Opps - that wasn't a suggestion to try - it won't work on ARM Teensy at all. That is the AVR code - that was SIMPLE to add on the base Talkie.

There are a couple more moving pieces where the Teensy version would conditionally do that for AVR - or in the ARM case stop the timer and clean up a few more items for safe restart.

1st_Order_Lowpass_Filter_RC.svg.jpg

Thanks for the info. Appears to be not so simple to cut the 62.5khz block wave on a Teensy. Decided to go for the hardware solution.
A simple low-pass filter using a 4k7 resistor and a 15nF capacitor did the trick (image taken from wikipedia). The resulting 2.2khz cut-off frequency effectively filtered out the 62.5kHz block wave without affecting the sound quality of the Talkie voice.
 
View attachment 18295

Thanks for the info. Appears to be not so simple to cut the 62.5khz block wave on a Teensy. Decided to go for the hardware solution.
A simple low-pass filter using a 4k7 resistor and a 15nF capacitor did the trick (image taken from wikipedia). The resulting 2.2khz cut-off frequency effectively filtered out the 62.5kHz block wave without affecting the sound quality of the Talkie voice.

Nice that worked as expected. The code wouldn't be hard to change - just some #ifdef stuff in the way and then testing the cases …

It might even make sense to stop the timer anytime the queue goes empty - stop the noise and wasting cycles for nothing.
 
Status
Not open for further replies.
Back
Top