-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* path fix issue * proof of concept sound effects * adding boxing bell ring * boxing bell ring * refactor sounds to work with state machine, writing becomes typing * also adding specific openai model
- Loading branch information
Showing
16 changed files
with
66 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { setStatusbarText } = require('../../../extension'); | ||
const State = require('../../../util/statemachine/State'); | ||
const { playSound } = require('../../../util/sound-effects'); | ||
|
||
class TypingState extends State { | ||
onActivate() { | ||
setStatusbarText('$(record-keys) Typing code...'); | ||
this.stateMachine.webserver.sendStatus('typing'); // state machine is our agent in this case | ||
playSound('typing'); | ||
} | ||
} | ||
|
||
module.exports = TypingState; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const player = require('play-sound')(); | ||
const { join } = require('path'); | ||
|
||
let sounds = { | ||
thinking: join( | ||
__dirname, | ||
'../../sounds/ES_Computer Tone 3 - SFX Producer.mp3' | ||
), | ||
typing: join( | ||
__dirname, | ||
'../../sounds/ES_Keyboard Typing 3 - SFX Producer.mp3' | ||
), | ||
challenge: join( | ||
__dirname, | ||
'../../sounds/ES_Boxing Bell Ring 2 - SFX Producer.mp3' | ||
), | ||
}; | ||
|
||
function playSound(sound) { | ||
const filepath = sounds[sound]; | ||
return new Promise((resolve, reject) => { | ||
player.play(filepath, (err) => { | ||
if (err) { | ||
console.error('Failed to play:', err); | ||
reject(err); | ||
} else { | ||
// console.log('Audio playback finished.'); | ||
// Hanging on this, not sure why | ||
// fs.unlinkSync(tempFilePath); | ||
resolve(); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
module.exports = { | ||
// sounds, | ||
playSound, | ||
}; |