Added xMasterX API v11.x source

This commit is contained in:
UberGuidoZ
2023-01-25 23:52:38 -08:00
parent 33322c0d73
commit e292fbfcd5
1094 changed files with 102160 additions and 0 deletions
@@ -0,0 +1,45 @@
App(
appid="SAM",
name="SAM WTF",
apptype=FlipperAppType.PLUGIN,
entry_point="sam_app",
requires=[
"gui",
"dialogs",
],
stack_size=4 * 1024,
order=20,
fap_icon="icons/music_10px.png",
fap_category="Music_Extra",
fap_icon_assets="icons",
)
App(
appid="SAM_YES",
name="SAM YES",
apptype=FlipperAppType.PLUGIN,
entry_point="sam_app_yes",
requires=[
"gui",
"dialogs",
],
stack_size=4 * 1024,
order=20,
fap_icon="music_10px.png",
fap_category="Music_Extra",
fap_icon_assets="icons",
)
App(
appid="SAM_NO",
name="SAM NO",
apptype=FlipperAppType.PLUGIN,
entry_point="sam_app_no",
requires=[
"gui",
"dialogs",
],
stack_size=4 * 1024,
order=20,
fap_icon="music_10px.png",
fap_category="Music_Extra",
fap_icon_assets="icons",
)
Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

@@ -0,0 +1,36 @@
#include <furi.h>
#include <furi_hal.h>
#include "stm32_sam.h"
// WOULD BE COOL IF SOMEONE MADE A TEXT ENTRY SCREEN TO HAVE IT READ WHAT IS ENTERED TO TEXT
STM32SAM voice;
extern "C" int32_t sam_app(void* p) {
UNUSED(p);
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(1000)) {
voice.begin();
voice.say(
"All your base are belong to us. You have no chance to survive make your time. ha. ha. ha. GOOD BYE. ");
furi_hal_speaker_release();
}
return 0;
}
extern "C" int32_t sam_app_yes(void* p) {
UNUSED(p);
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(1000)) {
voice.begin();
voice.say("Yes");
furi_hal_speaker_release();
}
return 0;
}
extern "C" int32_t sam_app_no(void* p) {
UNUSED(p);
if(furi_hal_speaker_is_mine() || furi_hal_speaker_acquire(1000)) {
voice.begin();
voice.say("No");
furi_hal_speaker_release();
}
return 0;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,96 @@
#include <furi.h>
#ifndef __STM32SAM__
#define __STM32SAM__
// SAM Text-To-Speech (TTS), ported from https://github.com/s-macke/SAM
class STM32SAM {
public:
STM32SAM(uint32_t STM32SAM_SPEED);
STM32SAM();
void begin(void);
void
sam(const char* argv,
unsigned char phonetic,
unsigned char singmode,
unsigned char pitch,
unsigned char speed,
unsigned char mouth,
unsigned char throat);
void
sam(char* argv,
unsigned char phonetic,
unsigned char singmode,
unsigned char pitch,
unsigned char speed,
unsigned char mouth,
unsigned char throat);
void say(const char* argv);
void say(char* argv);
void sing(const char* argv);
void sing(char* argv);
void sayPhonetic(const char* argv);
void sayPhonetic(char* argv);
void singPhonetic(const char* argv);
void singPhonetic(char* argv);
void setVoice(
unsigned char _pitch = 64,
unsigned char _speed = 72,
unsigned char _mouth = 128,
unsigned char _throat = 128);
void setPitch(unsigned char _pitch = 64);
void setSpeed(unsigned char _speed = 72);
void setMouth(unsigned char _mouth = 128);
void setThroat(unsigned char _throat = 128);
private:
void SetAUDIO(unsigned char main_volume);
void Output8BitAry(int index, unsigned char ary[5]);
void Output8Bit(int index, unsigned char A);
unsigned char Read(unsigned char p, unsigned char Y);
void Write(unsigned char p, unsigned char Y, unsigned char value);
void RenderSample(unsigned char* mem66);
void Render();
void AddInflection(unsigned char mem48, unsigned char phase1);
void SetMouthThroat();
unsigned char trans(unsigned char mem39212, unsigned char mem39213);
void SetInput(char* _input);
void Init();
int SAMMain();
void PrepareOutput();
void Insert(
unsigned char position /*var57*/,
unsigned char mem60,
unsigned char mem59,
unsigned char mem58);
void InsertBreath();
void CopyStress();
int Parser1();
void SetPhonemeLength();
void Code41240();
void Parser2();
void AdjustLengths();
void Code47503(unsigned char mem52);
void Code37055(unsigned char mem59);
void Code37066(unsigned char mem58);
unsigned char GetRuleByte(unsigned short mem62, unsigned char Y);
int TextToPhonemes(unsigned char* input); // Code36484
uint32_t _STM32SAM_SPEED;
unsigned char speed;
unsigned char pitch;
unsigned char mouth;
unsigned char throat;
unsigned char phonetic;
unsigned char singmode;
}; // STM32SAM class
#endif