You could build on wiktionary dbpedia an send a SPARQL query like the following one to their SPARQL endpoint:
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wt:<http://wiktionary.dbpedia.org/terms/>
SELECT DISTINCT ?spell ?pronounce
WHERE { 
  ?spell rdfs:label "work"@en ;
            wt:hasLangUsage ?use .
  ?use dc:language wt:English ;
          wt:hasPronunciation ?pronounce .
}
In this case "work" is the word for which you want to look up the spelling.
EDIT:
A similar project is dbnary, which is more active and delivers more reliable results. You can use the SPARQL endpoint with the following query:
SELECT DISTINCT ?pronun
WHERE {
  ?form lemon:writtenRep "work"@en ;
        lexinfo:pronunciation ?pronun .
}