Simple text plain talk program - filterhappier - radiohead
i was wondering if anyone knew if there was an online program where i could type in text and have the retro robotic voice read it out like on the old macs. i have a computer thus using windows so i doubt i can download the program though apple however if anyone knows of a website that will allow me to do this i would appreciate it. if you dont know what im talkign about, a similar program is used in the song filter happier by radiohead
As far as I know it is still on the NEW macs. As for a PC app, I don't know. Probably. Do a google search for speech from text and see what comes up. Or you could just buy an old used Mac I see old G3s going for $100 or less here and there.
Similar Messages
-
Morning,
I have gotten a new assignment which requires me to right a Text I/O program and to copy it as well. We are required to copy it using Command Line parameters I believe. Replacing the string of the text file created and copying it to a new file. So far I have the class written to write and read the file but the copying of the file does not seem to work.
Here is the code so far: import java.io.*;
import java.util.*;
public class WriteFile {
public static void main (String []args)throws Exception {
File text = new File("text.txt");
if (text.exists()) {
System.out.println("File already exists " + text.exists());
System.exit(0);
String [] array = {
"Josh Harper ",
"CS Student ",
"January 22 1986 "
PrintWriter output = new PrintWriter(text);
for (int i= 0; i<3; i++) {
output.println(array);
output.close();
import java.io.*;
import java.util.*;
public class ReadFile {
public static void main(String[] args) throws Exception {
File text = new File("text.txt");
Scanner input = new Scanner(text);
while(input.hasNext()) {
String fname = input.next();
String lname = input.next();
String degree = input.next();
String student = input.next();
String month = input.next();
int date = input.nextInt();
int year = input.nextInt();
System.out.println(fname + " " + lname + "\n" + degree + " " + student + "\n" + month + " " + date + " " + year);
input.close();
import java.io.*;
import java.util.*;
public class CopyText {
public static void main (String[] args) throws Exception {
if (args.length != 4) {
System.out.println("Usage:java CopyText.java text.txt copy.txt PrintWriter PrintWriter");
System.exit(0);
File sourcefile = new File(args[0]);
if (!sourcefile.exists()) {
System.out.println("Source file " + args[0] + " does not exist");
System.exit(0);
File copyfile = new File(args[1]);
if (copyfile.exists()) {
System.out.println("The copy file " + args[1] + " already exists");
System.exit(0);
Scanner input = new Scanner(sourcefile);
PrintWriter output = new PrintWriter(copyfile);
while(input.hasNext()) {
String s1 = input.nextLine();
String s2 = s1.replaceAll(args[2], args[3]);
output.println(s2);
input.close();
output.close();
Any insight on how the code for copying text by passing through as a command-line argument will be much of a great help, the book we use is very vague and the professor explanation was hard to replicate while doing my own program
Thanks in advance.Hello,
I'm not exactly sure of what your problem but if you just want to copy files, whether they are plain text or other, you can just use the good old method which copy byte by byte your file
public static void copyFile(File in, File out) throws Exception {
FileInputStream fis = new FileInputStream(in);
FileOutputStream fos = new FileOutputStream(out);
try {
byte[] buf = new byte[1024];
int i = fis.read(buf);
while (i != -1) {
fos.write(buf, 0, i);
i = fis.read(buf);
catch (Exception e) {
throw e;
finally {
if (fis != null) fis.close();
if (fos != null) fos.close();
}You can also, if you want to go deeper, check at the java API for java.nio.channels for faster copy but I'm not a huge fan of it. -
Does OS Tiger have any built in text or typing programs?
Does Tiger have any built in text or typing programs or do you have to buy iWork for Pages? Does it have anything simple like Wordpad in Windows built in? Thanks!
Compaq Presario 700 Windows XPAnd don't allow the very simple interface and plain/no frills appearance of Text Edit fool you since looks can be deceiving.
It is much more capable than it appears. -
Cannot print a simple Text File
Hello All,
I wrote the following program
import java.io.*;
import java.awt.print.*;
import javax.print.*;
import javax.print.attribute.*;
import javax.print.attribute.standard.*;
public class TestPrint
public static void main(String[] args) throws Exception
FileInputStream fis = new FileInputStream(new File("pds.txt"));
byte[] fileByte = new byte[34];
int read = 0;
int counter = 0;
while((read = fis.read()) != -1)
fileByte[counter++] = (byte)read;
PrintService services[] = PrinterJob.lookupPrintServices();
DocFlavor flavor = DocFlavor.INPUT_STREAM.TEXT_PLAIN_US_ASCII;
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(MediaSizeName.ISO_A4);
aset.add(new Copies(1));
Doc doc = new SimpleDoc(fileByte, flavor, null);
DocPrintJob pj = services[0].createPrintJob();
pj.print(doc, aset);
}The file I am trying to print is a simple text file. My requirement is to convert it to an array of bytes and then print it.
However I get the exception
Exception in thread "main" java.lang.IllegalArgumentException: data is not of de
clared type
at javax.print.SimpleDoc.<init>(Unknown Source)
at TestPrint.main(TestPrint.java:25)
Please help me. I would appriciate any help in this matter.
regards,
Abhishek.
PS: The contents of the file (pds.txt) which I am trying to print is
PDS
pds
pds
pds
pdsHi,
you get a java.lang.IllegalArgumentException in line 25:
So we take the Java API for SimpleDoc:
IllegalArgumentException - if flavor or printData is null, or the printData does not correspond to the specified doc flavor--for example, the data is not of the type specified as the representation in the DocFlavor.
Since fileByte seems not the be null, the type must be wrong!
In line 21 we see:
DocFlavor flavor = DocFlavor.INPUT_STREAM.TEXT_PLAIN_US_ASCII;
so fileByte must be type java.io.InputStream, which it isn�t. This causes your IllegalArgumentException.
So try in line 21:
DocFlavor flavor = DocFlavor.BYTE_ARRAY.TEXT_PLAIN_US_ASCII;
Let me know if that was the reason!
Best regards
Martin -
Multipart message has "text/plain" content type.
Hi all,
I am developing an application which can send and receive email messages including attachments.Because i dont have easy access to real mail servers at the moment, i am using my laptop to test everything("localhost"). my code so far have been able to send,receive and display text messages. it can also send email messages with attachments. The problem comes when i want to retrieve the attachment messages from the "multipart" message. message.isMimeType("multipart/*") returns false and getContentType() method on the message returns "text/plain". as a result my code can not start retreiving the attachments.
I saved the email message after Transport.Sent(mymsg). Content of the file looks like bellow.
From: user1@localhost
To: user2@localhost, user1@localhost
Message-ID: <22643639.0.1212046661890.JavaMail.user1@localhost>
Subject: test
MIME-Version: 1.0
Thu May 29 10:37:41 EAT 2008: Thu May 29 10:37:41 EAT 2008
Date: Thu, 29 May 2008 10:37:42 +0300 (EAT)
------=_Part_1_30831739.1212046661890
This is text body part.
------=_Part_1_30831739.1212046661890
Content-Disposition: attachment; filename=testfile1.txt
content of testfile1.txt
------=_Part_1_30831739.1212046661890
Content-Disposition: attachment; filename=card1.pub
content of card1.pub
------=_Part_1_30831739.1212046661890
I can also see the received messages in the inbox( JAMES mail server is in my local machine). when opened using notpad, content of these messages is same as the content of the sent messages.
I am a biginner to java mail(using 1.4.1). so any kind of help would be appreciated. can this problem be linked to using my local machine as mail server or what? I have uninstalled AVG antivirus thinking that it can be interfering. but to no vail. am really stuck at the moment.
RegardsAre you sure you're using JavaMail 1.4.1? It looks like you're running into
an issue that existed back in JavaMail 1.2. How are you saving the message
to the file?
Try call msg.saveChanges() before sending the message.
Also, try using the demo programs that come with JavaMail to see if they're
working correctly, e.g., msgmultisendsample.java. -
FM with code to send a simple text mail to external ID
Hi All,
I need a FM with code if possible to send a simple text mail to an external e-mail id or distribution list. I tried using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 and was successfull in sending mail. But it requires attachment.
I need help to send mail without attachment with code.
All configurations done at my end.
Thanks
Anirban BhattacharjeeHi Anirban,
Please check this sample code.
* Email ITAB structure
DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF EMAIL_ITAB.
DATA: T_EMAIL LIKE SOOS1-RECEXTNAM. "EMail distribution list
CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
[email protected],[email protected].
* Initialization
REFRESH EMAIL_ITAB.
* Populate data
EMAIL_ITAB-LINE = Email body text 1.
APPEND EMAIL_ITAB.
EMAIL_ITAB-LINE = Email body text 2.
APPEND EMAIL_ITAB.
T_EMAIL = C_EMAIL_DISTRIBUTION.
* --- EMAIL FUNCTION ---------------------------------------------------
* REQUIRMENTS:
* 1) The user running the program needs a valid email address in their
* address portion of tx SU01 under external comms -> SMTP -> internet
* address.
* 2) A job called SAP_EMAIL is running with the following parameters:
* Program: RSCONN01 Variant: INT User: XXX
* This program moves mail from the outbox to the mail server using
* RFC destination: SAP_INTERNET_GATEWAY_SERVER
* INTERFACE:
* 1) APPLICATION: Anything
* 2) EMAILTITLE: EMail subject
* 3) RECEXTNAM: EMail distribution lists separated by commas
* 4) TEXTTAB: Internal table for lines of the email message
* EXCEPTIONS:
* Send OK = 0 otherwise there was a problem with the send.
CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
EXPORTING
APPLICATION = 'EMAIL'
EMAILTITLE = 'Email Subject'
RECEXTNAM = T_EMAIL
TABLES
TEXTTAB = EMAIL_ITAB
EXCEPTIONS
OTHERS = 1.
Function Z_SEND_EMAIL_ITAB
*"*"Local interface:
*" IMPORTING
*" VALUE(APPLICATION) LIKE SOOD1-OBJNAM
*" VALUE(EMAILTITLE) LIKE SOOD1-OBJDES
*" VALUE(RECEXTNAM) LIKE SOOS1-RECEXTNAM
*" TABLES
*" TEXTTAB STRUCTURE SOLI
*- local data declaration
DATA: OHD LIKE SOOD1,
OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
DATA: BEGIN OF RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF RECEIVERS.
*- fill odh
CLEAR OHD.
OHD-OBJLA = SY-LANGU.
OHD-OBJNAM = APPLICATION.
OHD-OBJDES = EMAILTITLE.
OHD-OBJPRI = 3.
OHD-OBJSNS = 'F'.
OHD-OWNNAM = SY-UNAME.
*- send Email
CONDENSE RECEXTNAM NO-GAPS.
CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
*- for every individual recipient send an Email
* (see OSS message 0120050409/0000362105/1999)
WHILE RECEXTNAM CS ','.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM+0(SY-FDPOS).
ADD 1 TO SY-FDPOS.
SHIFT RECEXTNAM LEFT BY SY-FDPOS PLACES.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDWHILE.
*- check last recipient in recipient list
IF RECEXTNAM <> SPACE.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDIF.
ENDFUNCTION.
* FORM SO_OBJECT_SEND_REC *
FORM SO_OBJECT_SEND_REC
TABLES OBJCONT STRUCTURE SOLI
RECEIVERS STRUCTURE SOOS1
USING OBJECT_HD STRUCTURE SOOD1.
DATA: OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
EXTERN_ADDRESS = 'X'
OBJECT_HD_CHANGE = OBJECT_HD
OBJECT_TYPE = 'RAW'
OUTBOX_FLAG = 'X'
SENDER = SY-UNAME
IMPORTING
OBJECT_ID_NEW = OID
SENT_TO_ALL = TO_ALL
OFFICE_OBJECT_KEY = OKEY
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC <> 0.
RAISE OTHERS.
ENDIF.
ENDFORM.
* FORM INIT_REC *
FORM INIT_REC TABLES RECEIVERS STRUCTURE SOOS1.
CLEAR RECEIVERS.
REFRESH RECEIVERS.
MOVE SY-DATUM TO RECEIVERS-RCDAT .
MOVE SY-UZEIT TO RECEIVERS-RCTIM.
MOVE '1' TO RECEIVERS-SNDPRI.
MOVE 'X' TO RECEIVERS-SNDEX.
MOVE 'U-' TO RECEIVERS-RECNAM.
MOVE 'U' TO RECEIVERS-RECESC.
MOVE 'INT' TO RECEIVERS-SNDART.
MOVE '5' TO RECEIVERS-SORTCLASS.
APPEND RECEIVERS.
ENDFORM.
Hope this will help.
Regards,
Ferry Lianto -
JEditorPane: transforming between caret position in html and text/plain
Hi all,
I've done quite a bit of searching, and found problems similar to this one, but not this exactly, so I'll try asking it here.
I have a JEditorPane with HTMLEditorKit, which I'm using for a WYSIWYG text editor. When the user wants to insert something, say an image, I get the caret position and insert a String into the document's underlying text.
The problem is that if we are the WYSIWYG mode, the caret position isn't the same as the caret position in text/plaain mode.
So if the underlying text is
<html>
<body>
Some text
</body>
</html>the user will just see "Some text". If they place the caret between "Some" and "text", editorPane.getSelectionStart() will return '5'. But I want to insert my text at position '16' in the plain text.
Is there a simple way to go back and forth between these two positions? Or to have getSelectionStart() to return the index relative to the text/plain mode?
Thanks!
TimVery poor that no one answered this one.
Did you still need the answer?
I have 'a' answer. But not a complete one.
In fact I only found this in search for an answer for my problem:
http://forums.sun.com/thread.jspa?threadID=5409216&tstart=0
Did you actually just test out what you knew so far to test what happens?
If you were to use the HTMLEditorKit.insertHTML function, it just wants the visual caret position. So '5' would have been reasonably correct for you.
I was doing something like this:
HTML.Tag tag = null;
Pattern p = Pattern.compile("\\s*\\<\\s*(\\w+).*", Pattern.MULTILINE|Pattern.DOTALL);
Matcher m = p.matcher(text);
if (m.matches())
tag = HTML.getTag(m.group(1));
kit.insertHTML(doc, offset,// +1
text, 0,// 0
0,// 0
tag);
Assuming you were inserting a tag, my code there checks what tag it is, and if that is known by the java implementation, assigns that to 'tag', so that the element is correctly inserted.
If it is not known, we just use 'null'. Which for me wasn't such a great result.
In fact, nothing really was a great result, as with the default java implementation being buggy (so far as I can see) it inserted to the wrong position and caused all sorts of anomalies.
Hope you worked it out. And if you did, and have a better result than what I have, maybe you can let me know what you did!
Sincerely,
sean -
Decoding the content (text/plain) for charset "iso-2022-jp"
Hi there,
I am using IMAP protocol to receive new email message and retrieving the contents using java mail API InputStream is = p.getInputStream()
The part content type is text/plain and text/html and charset is "iso-2022-jp"
The contents contain Japanese Characters as well. In my code, I am decoding the contents using charset "iso-2022-jp" to get the actual content (verified by sending the same content using SFTP client built on java mail APIs). The contents are decoded properly in Linux OS but not working properly on Windows OS.
Can anybody help me out the root cause of this problem? The code snippet is as follows
InputStream is = p.getInputStream();// p is Part object
byte[] bytesJap = IOUtils.toByteArray(is); // org.apache.commons.io.IOUtils
String decodedBytesJap = decodeBytes(charset, bytesJap);
The content I am getting while deploying the program
on Linux box:
Subject: FW: Japanese characters
聖書に示された神の純粋なみ言葉に基づいて
on Windows box:
Subject: FW: Japanese characters
$B@;=q$K<($5$l$??@$N=c?h$J$_8@MU$K4p$E$$$F(B&
----------------------------------------------decodeBytes() method implementation is as below
protected String decodeBytes(String characterset, byte[] bytes) throws CharacterCodingException
CharsetDecoder decoder = null;
try {
decoder = Charset.forName(characterset)
.newDecoder();
} catch (IllegalCharsetNameException e) {
} catch (UnsupportedCharsetException e) {
decoder.onMalformedInput(CodingErrorAction.REPORT);
decoder.onUnmappableCharacter(CodingErrorAction.REPORT);
try {
return decoder.decode(ByteBuffer.wrap(bytes)).toString();
catch (CharacterCodingException e) {
throw e;
} -
Css and js in simple text items.
Portal 9.0.2.3
I've read in other threads that you can add javascript and css into simple text items by clicking the 'View HTML Source' checkbox and adding the js or css code.
When I do this then apply it the code that I have added disappears and therefore has no effect on the item.
Any ideas what I'm doing wrong?
Cheers,
Steven.That's a known problem with the IE rich text editor that would require a fix from Microsoft. In 9.0.2.6 we allow you to disable the editor at the page group level as a workaround to this problem, but then all users have to enter plain HTML.
As an alternative, you can use the HTML portlet or a dynamic page portlet to enter script and other problematic HTML code. In 9.0.2.6, you can disable the editor for a page group that is used to maintain banners and nav bar, and then publish those pages as portlets.
Regards,
Jerry
PortalPM -
The Web-Based Email plugin has crashed. I get this message when trying to paste simple text into an email document. I have updated plugins and have run out of options. If I use another browser I have no problem. Please advise.
UPDATE
Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
Thanks.
Fede. -
Everytime i try to add a text box the program crashes. Why and how do I fix it?
Since I purchased and installed Adobe Photoshop Elements every time I try to add a text box the program crashes. Why and how do I fix it?
TeeKnows wrote:
Debit cards are accepted in the iTunes store.
No longer accepted for NEW accounts, however if a debit card were associated with the account BEFORE this change, they can still be used. -
Pixelated Text in Adobe Programs (MacBook Pro - Retina)
I have a new laptop, a Macbook Pro with Retina Display (mid-2014). I already have a iMac and never experienced this issue before. The text in various programs like photoshop, illustrator & acrobat are pixelated. It's not only the text in the menu/notification/warning windows (see photo for ref) but also the text within a vector based program like llIustrator (see photo for ref). Now I have not yet installed any other fonts on here - all are factory fonts so far. Not sure if that has anything to do with it. I am experienced with Macs (raster/pixelation vs. vector art) but not enough to know why I am having this issue. Thanks!
Clinton- The problem is that the way things are setup is a bit confusing. Apple doesn't let us use the actual full resolution of 2880 x 1800, in relateive size. There is a hack to see the screen at full native resolution, and it's unbelievably small. So what they do is use the pixels, but use 4 vs 1, and thus they make the UI look like it would look as standard 1440 x 900 display. I have an old 15" and looking at both, the UI is the same relative size on the screen. However the retina is using more pixels to make the same physical size.
Now, Apple also lets apps use 1:1 within their "working area." For instance, if you view a graphic on a web page, it shows it doubled, and pixelated. But if you drag that image to the desktop then open in Preview, preview will show it half size of Safari, but in actual resolution. it's sharp, but half the size of Safari, as Safari is doubling it. So apps can take advantage of that but will have to be updated. Pixelmator isn't updated, and graphics/text/vectors are blurry in their work area, but once you save/export, and view in preview, they are perfect.
So there is going to be a lot of strange stuff going on until everyone gets on the same page.
I did find you can view Pages/Numbers with better resolution (just not icons) by right-clicking "get info" and unchecking open in low resolution. But Pages acts weird. I will post a screenshot in a minute about what I mentioend about apps using the native resolution within work spaces.
Bryan -
Portal Doesn't Display page with text/plain content type
Hi,
I created a WSRP portlet with text/plain content type and added it to my page, but I get the following error message:
Error: Could not get markup. The cookie or session is invalid or there is a runtime exception.
when I add the portlet to my page.
It works when I use text/html content, but text/plain doesn't work.
Any ideas how I can get my portlet to display in the portal?
Thanks in advance,
GBIE6 cannot display text/plain (support.microsoft.com/kb/329661).
Does the server know what to do (i.e. how to render) with text/plain? -
I just did the photoshop camera raw update and now every time I try to do a text box or change the text the whole program crashes.
All fixed!!! My Aperture wasn't being recognized because it was in a folder. OK, now I can use my camera with Aperture.
-
How can I get my text to speech program NVDA to work on Adobe Digital Edition 2.0?
Adobe Digital Edition 2.0 text to speech program NVDA is suppose to work. How can I get it to work?
In short, no. iAS is a 2.2 servlet container. You would have to backport your application to version 2.2 of the servlet spec.
Maybe you are looking for
-
Apple TV 3rd Gen no longer sees Airport Express 1st gen in Airplay after update
Apple TV 3rd gen was connected to AirPort Express 1st gen via WiFi, drove a video device via HDMI and sent audio to the AirPort using Airplay and selecting the AirPort Express under Speakers. I could adjust the volume with the AppleTV remote. Apple T
-
Boot Camp 3.0 recognises Mac HFS drives but does not list all folders
Hi I have just done a clean install of Boot Camp/Windows XP using the Boot Camp 3.0 drivers that come with Snow Leopard, and was pleased to find native support for Mac Drives (HFSJ). Whilst all of the Mac drives in my Mac Pro are recognised and can b
-
How to Customize the Standard UWL component
Hello Experts, We have a requirement to customize the standard UWL component. But I am not sure how to get standard UWL source code in NWDS and how to create a custom DC from the standard component with different namespace. Can anyone please guide m
-
Set approver in startworkflow method in web service
Hello I would like to set approver to web service workflows. I can start my workflow via web service but everytime i do it it sends mail to me. I would like to how how to change email which is sent to. (how to change approver) best regards.
-
Upgraded iTunes to 11. Now my sync with windows ms outlook is not working.
The synchronization between my windows 7 notebook end the iPad 4 via cable is not synchronizing MS Outlook after upgrade to iTunes 11, it synchronizes only apple amd app stuff and recreational stuff. Sort of getting my iPad out of my business environ