Speech in the space: Difference between revisions

From NURDspace
mNo edit summary
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Project
{{Project
|Name=Speech in the space
|Name=Speech in the space
|ProjectSkills=Coding,
|Skills=Coding,
|ProjectStatus=Active
|Status=Production
|ProjectNiche=Software
|Niche=Software
|ProjectPurpose=Fun
|Purpose=Fun
|Picture=Speech.gif
|Tool=No
|Location=
|Cost=
|Category=
}}
}}
This page is documentation on the 'let's annoy the space vocally' project.
This page is documentation on the 'let's annoy the space vocally' project.
Line 10: Line 15:
== History ==
== History ==


buZz coded a small text-2-speech irc bot. was on http://pastebin.com/3kj2BJ5U. Flok then rm -rf /* all files with it. After this it was decided it was a  bad idea for now (or at least nobody picked it up). Months later Tall0ak wrote a plugin for jsonbot (aka NURDbot) in python. This set-up was broken when we moved to the current location. The_Niz wrote a new plugin for [[Nurdbot]] which connects to [[Slab]] (used to be [[Robinson]]). This is currently active.
buZz coded a small text-2-speech irc bot. was on http://pastebin.com/3kj2BJ5U. Flok then rm -rf /* all files with it. After this it was decided it was a  bad idea for now (or at least nobody picked it up). Months later Tall0ak wrote a plugin for jsonbot (aka NURDbot) in python. This set-up was broken when we moved to the current location. The_Niz wrote a new plugin for [[Nurdbot]] which connects to [[Slab]] and [[Smokescreen]]. This is currently active.
 
A new service has been written around espeak - https://git.nurd.space/g-j-s-dawes/espeak-server . This service listens on port 16016 for strings and, if present, interprets tab-separated constants as speech variables. It is fed from nurdbot via [[vinculum]], so that a single message can be split across multiple receivers. The code for nurdbot is in the git repo.
 
This service is started via init.d, service espeak-server. The code is in the git repo.
 
Additionally, vinculum forwards the strings and users to the bigledpanel for display in the space.


== Available commands ==
== Available commands ==


* !speak <text>  
* !speak <text>  
This command outputs <text> as speech in the space.
This command outputs <text> as speech in the space via festival.


* !espeak <text>
This command outputs <text> as speech in the space via espeak.
* !espreek <text>
This command outputs <text> as speech in the space via espeak with a Dutch accent.
* !esprech <text>
This command outputs <text> as speech in the space via espeak with a German accent.
* !edire <text>
This command outputs <text> as speech in the space via espeak with a French accent.
* !espeak-settings <text>
By default each new IRC user gets a randomly assigned voice. This command allows you to configure these settings.


== Hark hark hark hark ==
== Hark hark hark hark ==


  !speak ick hab here un brief for min moodar
  !espreek ick hab here un brief for min moodar
  !speak dee hoog in the himmel is  
  !espreek dee hoog in the himmel is  
  !speak dee zeh brief binned ick fast oop min fliger
  !speak dee zeh brief binned ick fast oop min fliger
  !speak mar fuck then mar up, mit je zalm
  !speak mar fuck then mar up, mit je zalm
Line 35: Line 60:
  !speak rootjay pohfre ay sjahmn tahmn
  !speak rootjay pohfre ay sjahmn tahmn
  !speak weir hahben S neeght kuh woost?
  !speak weir hahben S neeght kuh woost?
== nodejs quickfix ==
<pre>
var espeak = require('espeak');
var fs = require('fs')
var Sound = require('aplay');
// de+m1 160 0 100 50 username test
// [
//  'de+m1',
//  '160',
//  '0',
//  '100',
//  '50',
//  'nooitaf',
//  'test\n'
// ]
var net = require('net');
var server = net.createServer(function(socket) {
  socket.on('data', function(data) {
    var d = data.toString().split('\t')
    var opt1 = '-v ' + d[0].split('+')[0]
    var opt2 = '-g ' + d[1]
    var opt3 = '-k ' + d[2]
    var opt4 = '-s ' + d[3]
    var opt5 = '-a 100'
    espeak.speak(d[6], [opt5], function(err, wav) {
      if (err) console.log(err)
      fs.writeFile("./speak.wav", wav.buffer, function(err) {
        if (err) console.log(err)
        new Sound().play('./speak.wav');
      })
    });
  });
});
server.listen(16016, '0.0.0.0');
</pre>

Revision as of 23:11, 19 August 2017

Speech in the space
Speech.gif
Participants User:buzz, Dennis
Skills Coding
Status Production
Niche Software
Purpose Fun
Tool No
Location
Cost
Tool category

Speech in the space

Speech.gif {{#if:No | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:No | [[Tool Cost:: | }}

This page is documentation on the 'let's annoy the space vocally' project.

History

buZz coded a small text-2-speech irc bot. was on http://pastebin.com/3kj2BJ5U. Flok then rm -rf /* all files with it. After this it was decided it was a bad idea for now (or at least nobody picked it up). Months later Tall0ak wrote a plugin for jsonbot (aka NURDbot) in python. This set-up was broken when we moved to the current location. The_Niz wrote a new plugin for Nurdbot which connects to Slab and Smokescreen. This is currently active.

A new service has been written around espeak - https://git.nurd.space/g-j-s-dawes/espeak-server . This service listens on port 16016 for strings and, if present, interprets tab-separated constants as speech variables. It is fed from nurdbot via vinculum, so that a single message can be split across multiple receivers. The code for nurdbot is in the git repo.

This service is started via init.d, service espeak-server. The code is in the git repo.

Additionally, vinculum forwards the strings and users to the bigledpanel for display in the space.

Available commands

  • !speak <text>

This command outputs <text> as speech in the space via festival.

  • !espeak <text>

This command outputs <text> as speech in the space via espeak.

  • !espreek <text>

This command outputs <text> as speech in the space via espeak with a Dutch accent.

  • !esprech <text>

This command outputs <text> as speech in the space via espeak with a German accent.

  • !edire <text>

This command outputs <text> as speech in the space via espeak with a French accent.

  • !espeak-settings <text>

By default each new IRC user gets a randomly assigned voice. This command allows you to configure these settings.

Hark hark hark hark

!espreek ick hab here un brief for min moodar
!espreek dee hoog in the himmel is 
!speak dee zeh brief binned ick fast oop min fliger
!speak mar fuck then mar up, mit je zalm
!speak noik yow ick do need what yaj maaj sekt
!speak HOORAAA
!speak yah rhine stah pahnahcook are eye, zack ick yah
!speak domini keh ni keh ni keh
!speak sahn ahllait toot simpelemahmn
!speak rootjay pohfre ay sjahmn tahmn
!speak weir hahben S neeght kuh woost?


nodejs quickfix

var espeak = require('espeak');
var fs = require('fs')
var Sound = require('aplay');

// de+m1	160	0	100	50	username	test
// [
//   'de+m1',
//   '160',
//   '0',
//   '100',
//   '50',
//   'nooitaf',
//   'test\n'
// ]

var net = require('net');

var server = net.createServer(function(socket) {
  socket.on('data', function(data) {
    var d = data.toString().split('\t')
    var opt1 = '-v ' + d[0].split('+')[0]
    var opt2 = '-g ' + d[1]
    var opt3 = '-k ' + d[2]
    var opt4 = '-s ' + d[3]
    var opt5 = '-a 100'
    espeak.speak(d[6], [opt5], function(err, wav) {
      if (err) console.log(err)
      fs.writeFile("./speak.wav", wav.buffer, function(err) {
        if (err) console.log(err)
        new Sound().play('./speak.wav');
      })
    });
  });
});

server.listen(16016, '0.0.0.0');