Since version 8.11, we have been encouraging LAC users to install the free, well-known "espeak" text-to-speech application in their LINUX computers hosting LAC. This is optional, and LAC will run without espeak, but because espeak is so easy for LAC's new mission developers to use, and it makes such a nice enhancement to those missions, we anticipate that it will become increasingly attractive among our community.
In support of this, LAC already has an infrastructure that players can use in case espeak causes a problem for them. In our experience, if espeak is NOT installed, then any attempt any future mission may make to use it is simply and harmlessly discarded by the operating system. Nevertheless, there is already a user-configurable provision that will prevent LAC from attempting to invoke espeak. This could be used by any user that ever has a problem caused by espeak. It's done by setting the "16" bit within LAC's "NetworkMode" configuration variable within the user's ~home/.LAC/LacConfig.txt configuration file.
Here is a very simple code block sample showing how to invoke espeak:
That code will cause espeak to vocalize "Welcome! This is an experimental mission", in English, through your LINUX headset or speakers. Mission developers can insert blocks of code like that throughout new missions to announce mission events or conditions to the player.
Last edit: bbosen 2022-04-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A more sophisticated use of espeak is shown below:
if (! (NetworkMode & 16))
{
popen ("espeak -a 175 -s 150 -p 10 \"Asking the LAC Server to end this gun camera segment.\"", "r");
}
~~~
That version uses additional command-line arguments to set the audio amplitude to 175, the speed to 150, and the acoustic "pitch" to 10.
If you experiment with those command-line arguments you can come up with interesting variations on the generated sound. To get more details about the available options, from a command prompt, just enter:
espeak --help
Last edit: bbosen 2023-03-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using code snippets and patterns as shown above, mission developers can insert text-to-speech into the design of a mission, and they can also bracket the invocation of espeak with conditional statements based on the presence (or absence) of other players and their locations.
This would allow very sophisticated, conditional insertion of speech sounds when appropriate mission conditions are present. Consider the following types of conditions:
1- No Sentient Players at all. This could trigger vocalization of a message like: "THIS IS BLUETEAM HQ: WE CAN'T LOCATE ANY SENTIENT PLAYERS. WE'RE CHECKING FOR ANY REPLAY BLOKES...."
2- No Replay Blokes at all. This could trigger vocalization of a message like: "THIS IS BLUETEAM HQ: WE CAN'T LOCATE ANY REPLAY BLOKES..."
3- Upon entry of a new Sentient Player. This could trigger vocalization of a message like "THIS IS BLUETEAM HQ: RADAR JUST DETECTED A NEW SENTIENT PLAYER ON THE BLUETEAM. HIS PLAYER ID # IS 8."
4- After detection of a "squadron" (2 or more) Replay Blokes forming up on an airfield. This could trigger vocalization of a message like: "THIS IS BLUETEAM HQ: OUR FORWARD OBSERVER REPORTS A SQUADRON OF REDTEAM PLAYERS FORMING UP AT THE RED HQ AIRFIELD. THE PLANES APPEAR TO BE REPUBLIC P47 THUNDERBOLTS."
The four cases listed above are just samples to illustrate the possibilities. Many variations on those themes are obvious, like reporting from the viewpoint of the REDTEAM instead of the BLUETEAM, etc. In each of those cases, it will also be necessary to code "semaphore" logic and timer logic to ensure that each such message is vocalized only once within a reasonable time period (5 minutes or so).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since version 8.11, we have been encouraging LAC users to install the free, well-known "espeak" text-to-speech application in their LINUX computers hosting LAC. This is optional, and LAC will run without espeak, but because espeak is so easy for LAC's new mission developers to use, and it makes such a nice enhancement to those missions, we anticipate that it will become increasingly attractive among our community.
In support of this, LAC already has an infrastructure that players can use in case espeak causes a problem for them. In our experience, if espeak is NOT installed, then any attempt any future mission may make to use it is simply and harmlessly discarded by the operating system. Nevertheless, there is already a user-configurable provision that will prevent LAC from attempting to invoke espeak. This could be used by any user that ever has a problem caused by espeak. It's done by setting the "16" bit within LAC's "NetworkMode" configuration variable within the user's ~home/.LAC/LacConfig.txt configuration file.
Here is a very simple code block sample showing how to invoke espeak:
That code will cause espeak to vocalize "Welcome! This is an experimental mission", in English, through your LINUX headset or speakers. Mission developers can insert blocks of code like that throughout new missions to announce mission events or conditions to the player.
Last edit: bbosen 2022-04-11
A more sophisticated use of espeak is shown below:
if (! (NetworkMode & 16))
{
popen ("espeak -a 175 -s 150 -p 10 \"Asking the LAC Server to end this gun camera segment.\"", "r");
}
~~~
That version uses additional command-line arguments to set the audio amplitude to 175, the speed to 150, and the acoustic "pitch" to 10.
If you experiment with those command-line arguments you can come up with interesting variations on the generated sound. To get more details about the available options, from a command prompt, just enter:
espeak --help
Last edit: bbosen 2023-03-09
Using code snippets and patterns as shown above, mission developers can insert text-to-speech into the design of a mission, and they can also bracket the invocation of espeak with conditional statements based on the presence (or absence) of other players and their locations.
This would allow very sophisticated, conditional insertion of speech sounds when appropriate mission conditions are present. Consider the following types of conditions:
1- No Sentient Players at all. This could trigger vocalization of a message like: "THIS IS BLUETEAM HQ: WE CAN'T LOCATE ANY SENTIENT PLAYERS. WE'RE CHECKING FOR ANY REPLAY BLOKES...."
2- No Replay Blokes at all. This could trigger vocalization of a message like: "THIS IS BLUETEAM HQ: WE CAN'T LOCATE ANY REPLAY BLOKES..."
3- Upon entry of a new Sentient Player. This could trigger vocalization of a message like "THIS IS BLUETEAM HQ: RADAR JUST DETECTED A NEW SENTIENT PLAYER ON THE BLUETEAM. HIS PLAYER ID # IS 8."
4- After detection of a "squadron" (2 or more) Replay Blokes forming up on an airfield. This could trigger vocalization of a message like: "THIS IS BLUETEAM HQ: OUR FORWARD OBSERVER REPORTS A SQUADRON OF REDTEAM PLAYERS FORMING UP AT THE RED HQ AIRFIELD. THE PLANES APPEAR TO BE REPUBLIC P47 THUNDERBOLTS."
The four cases listed above are just samples to illustrate the possibilities. Many variations on those themes are obvious, like reporting from the viewpoint of the REDTEAM instead of the BLUETEAM, etc. In each of those cases, it will also be necessary to code "semaphore" logic and timer logic to ensure that each such message is vocalized only once within a reasonable time period (5 minutes or so).